Forms :: How To Ensure That All Values In Query Are Generated

Dec 8, 2013

I have created a form taking in Data from a query.On the form I have created a combo box. The selected value is used in an criteria of the query.The criteria in the query is:[Forms].[frmMyPortfolio]![cbodep].How can I ensure that all values in query are generated, if their is no selection in the combos.

View Replies


ADVERTISEMENT

Forms :: How To Ensure Unique Data Across 2 Fields

Dec 17, 2014

What is considered the right approach to ensure a record entered in a form is unique. For example if i have a field:

Brands. Flavour
Walker. Ready salted
Smiths. Cheese and onion
Doritos. Ready salted
Walker. Ready salted

So what is the best way to ensure the third entry is fine as whilst ready salted already exists it doesnt exist for doritos but the fourth entry would pull up a msgbox refusing the entry as it is a repeat of entry one.

View 2 Replies View Related

Forms :: How To Ensure That Textbox Value Displayed Is Based On Combobox Selection

Nov 4, 2014

I am designing a Web Database with a bound form to a submit table.

On the form, I have a combo box with selections that should influence the value to be displayed in a textbox also on same form.

For instance the combo box for Staff Name contains list of all Staff and I want the textbox to automatically display the level of the staff that was just selected in the combobox.

I know how to get this done using a combobox but my boss insists that the level should be automatically displayed in the textbox once combobox selection is done.

Using the combobox for level, I used the select statement in the RowSource property :

SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));

I am in a dilemma of how to replicate this for the textbox because textbox only has control source and no RowSource where I can put this select statement.

Also, I will still need to bind this textbox to the submit table with the column name "TxtLevel" in the control source

Please see attached sample access db.

Also note that I cannot use action queries or VBA because it is a Web database and not a client database.

View 1 Replies View Related

Forms :: Format Memo Field To Ensure That Sentences Begin With Capital Letters

Nov 4, 2014

Is there a way to format a memo field to ensure that sentences begin with capital letters. There might have been something in the strConv function, but it seems my hopes are dashed?

View 1 Replies View Related

Forms :: VBA Generated HTML Text For Outlook

Dec 3, 2013

I use this bit of code to generate an Outlook email body with the contents of strBody. How can I modify this so the HTML generated is in "Courier new" font size 11?

With MailOutLook
.To = Recipient
.CC = RecipientCopy
.Subject = Subject
.BodyFormat = olFormatHTML
.Body = StrBody
.display
End With

View 4 Replies View Related

Between Dates Parameter Query - Extra Records Generated??

Apr 4, 2008

Good Evening Everybody,
I am currently helping some people out at work with their database. My knowledge of Access is very limited, and whilst my it is improving I have nonetheless come up against a ‘hurdle’ which I am struggling to jump. The database in question is not complex, quite the opposite in fact. Basically 1 table ‘Main Data’ , 1 data entry form and a few reports. The table includes 8 fields in the following formats:

ID: Auto Number
Area: Text
Equipment:Text
EquipSrlNo:Text
EquipLocalNo:Text
MOPNo:Number
DateDone:Date/Time
MOPPeriodicity:Text


I was recently asked to produce a report for them that would search between two dates using a parameter query and to then return the result. The problem is that when I generate it using the following SQL it returns records in the period that I asked for, but then collects ‘additional records’ which fall outside the date-span that I originally requested, i.e. search Between 03/04/08 And 30/04/08 produces data that relates to data in May, June, July 08 etc. I thought that what I was doing was correct, and it has worked for me in the past- but on this occasion I am absolutely confused???

SQL
SELECT [Main Data].Area, [Main Data].Equipment, [Main Data].EquipLocalNo, [Main Data].MOPNo, [Main Data].DateDone, [Main Data].EquipSrlNo, IIf([MOPPeriodicity]="1",DateAdd("m",1,[DateDone]),IIf([MOPPeriodicity]="3",DateAdd("m",3,[DateDone]),IIf([MOPPeriodicity]="6",DateAdd("m",6,[DateDone]),IIf([MOPPeriodicity]="WEEKLY",DateAdd("ww",1,[DateDone]))))) AS TestDueNext, [Main Data].MOPPeriodicity
FROM [Main Data]
WHERE ((([Main Data].Area)=[Enter Area Type]) AND ((IIf([MOPPeriodicity]="1",DateAdd("m",1,[DateDone]),IIf([MOPPeriodicity]="3",DateAdd("m",3,[DateDone]),IIf([MOPPeriodicity]="6",DateAdd("m",6,[DateDone]),IIf([MOPPeriodicity]="WEEKLY",DateAdd("ww",1,[DateDone])))))) Between [Enter Date Start] And [Enter DateStop]));

Unfortunately, I do not have a copy of the database in question and so I am unable to post it for the purpose of explanation.

Can some kind person point me in the right direction as I am slowly losing the ‘will to live’ Ha? Ha? You have always been so helpful in the past and hence the reason I have called upon my ‘forum friends’ to help me out?


Look forward to your response(s)


Best Regards

CarolW

View 4 Replies View Related

Saving Daily Generated Query For Later Lookup By Date?

Feb 26, 2014

I have a query that reports the number of students that are currently enrolled in a given number of schools within an area for that given day that the query is ran. This number can fluctuate greatly day to day, so is there a way to create a table which can hold this information so that I can go back in history and look up what our numbers were on whatever given day (date). (The example below is just a representation of what I actually have.) The School number would be unique, as would the date (I assume), I would like to see all of our school on whatever given date to see what our numbers are or were.

I have an example of the query currently I have set up in access 2007:

School # School Name Qty Date
001 BLUE 300 02/26/2014
002 RED 468 02/26/2014
003 YELLOW 10 02/26/2014

VS

School # School Name Qty Date
001 BLUE 310 02/27/2014
002 RED 400 02/27/2014
003 YELLOW 8 02/27/2014

View 3 Replies View Related

Use Query Generated Field As Criteria For Another Query?

Apr 2, 2008

I am trying to use a single record and cell of data generated from a query as criteria in another query but can't figure out how to do it? Is there a way to reference a query field in the criteria in design view of another query?

Details:

I have a table of data for each month with supplier codes in each table, but no date field.

I am trying to build a query that will automatically pick the most recent month of data. I have built a query that uses an iif statement in SQL assigning a number to the most recent month of data and then I am using the max filter in that query to show the single highest number (But this logic misses suppliers some suppliers but does assign a number to the most recent set of data). In this case its 2 for february data. I want to use this digit to filter a seperate criteria that will show me all the supplier codes for the month of february. One problem is that some suppliers are in every month others, come and go throughout the year, so I have to assign this criteria for each month. Therefore I want to use the 2 from the first query and plug that into each criteria section under each month field of the second query.

The other option that I can think of but can't seem to find a fix, is to merge all 12 tables so there are duplicate entries and can have a date or number assigned for each month that the supplier code shows up, then just use the max number. I can't seem to find a way to add all the codes creating duplicates into one field. I used a union query but there are no duplicates with this method thus foiling my plan.

Please help
Thanks for reading

View 1 Replies View Related

How Can I Ensure Data Is Selected From A Combo Box?

Dec 8, 2006

Can someone please help me?

I have a combo box on a form that the user can select a player name.
Under the combo box I have a label called "Show me information about selected Player: that once clicked takes the user to another form which has all information about the player that was previously selected in the combo box.

Everything works fine UNLESS the user forgets to select a playername from the combo box and clicks on the label anyway. Obviously no player name was selected so a blank form opens which is a problem!

How can I ensure that a player name is selected and prevent the user from clicking on the label below without having previously selecting from the combo box?

If anyone can please help I would appreciate it so much.

Rob

View 3 Replies View Related

Ensure A Calculated Field Is Always Positive

Jan 10, 2005

I have a calculated field which sums the quantity field for all transactions by the part#, lot# and location. (A part number could be in several different locations and lots and are treated sperately - if they are in the same location with the same lot number they are summed).

To add quantity the user enters the data using a form. To issue (subtract) the user uses a minus number (eg -20). The calculated field sums all these and outputs the current total.

How can I make sure this is always positive.

Ie. When the user does an issue the qty they specify will be less than or equal to the current total according to the sum calculation.

Thank you for any help

View 2 Replies View Related

Selling Access Database - How Do I Ensure User Has Valid License?

Feb 24, 2008

I am developing an Access database, and using the Access 2007 Developer Extensions to "compile" it into an installable program which includes the freely distributable Access 2007 RunTime, for users who don't have it already installed.

I am planning on charging a subscription fee to use my Access database. Are there any existing method for handling making sure the user's subscription is still active, and if not, either locking them our or preferably making everything read-only? If there aren't any existing methods anyone can point me to, does anyone have any ideas?

I plan on being the person who installs the application the first time, however I'm sure instances will come up where I instead mail the user a CD for them to install.

Regardless of whether I complete the first install, I'm not interested in going to each users' location periodically regarding the subscription.

I'm more interested in going the route of the user typing in some type of registration code, which is validated for read/write access for a period of time.

I don't want to rely on the user having an internet connection, but if they had one, I could certainly go the Microsoft model (try internet verification, if it goes wrong or there isn't a connection, have user call in.)

View 2 Replies View Related

Access Validation Rules To Ensure Accurate Data Entry

Jun 2, 2013

I have input boxes in access form. I want to limit entry of * in one of the input fields named "Name" anyway If * is found anywhere in anyform of data entry then it should show warning.

View 14 Replies View Related

Qbf Using Same Query But Different Forms And Values

Oct 1, 2014

I have a totals report based on a query the qbf is for the date input field. I want to be able to run this report from two separate forms the first form is for users where they select the month and year from a combo box the criteria looks like below this is done to ensure users only run monthly or yearly reports to limit the chance of picking the wrong dates

Like [Forms]![Switchboard_Form]![Month] & "*" & [Forms]![Switchboard_Form]![Year]

I have another form that is sort of the Management Form in which the qbf Totals report can be run more in depth such as a certain range maybe for a certain week by using start date and end date the criteria looks like below

>=Nz([Forms]![Managment_Form]![From],#01/01/100#) And <=Nz([Forms]![Managment_Form]![To],#12/31/9999#)

This lets totals be pulled using both, none, or one or the other of the start date and end date..Is there a way I can set up the query to tell which form is open and to use the correct criteria for that particular form. I tried using "or" however the query still prompts for the other set of values no matter which form u use but works fine when you remove the not needed criteria. I can provide a better example if needed let me know if this is unclear.

View 5 Replies View Related

Forms :: Use List Values In Query?

Mar 26, 2015

I have a list in a form where the user can select multiple values. The list "Projekte" is based on the table "Projekte".

I want to be able after the user selects multiple values from the list to use them in a query to show the respectful records. For example if the user selects Project 1 and Project 2. I want to show the records where there are either Project one or Project 2. Is that possible without VB as I have no knowledge of VB.

View 1 Replies View Related

Forms :: Control With Values From A Query OR A Table

Jan 27, 2015

I have an option group which should display a value from a table if txtWords is null, but the result of a query if txtWords is not null. But though it shows the right results when I load the form, updating txtWords gives me all sorts of errors.

txtWords is in the main form, while the option group optLengthCat is in a subform (but inline).

Form_OnCurrent() event:

Code:
'Enable or disable the option group
If Len(Me.txtWords.Value & vbNullString) = 0 Then
Me.fsubLengthCat.Form!optLengthCat.Enabled = True
Else
Me.fsubLengthCat.Form!optLengthCat.Enabled = False

[Code] .....

When I put this into txtWords_AfterUpdate() it starts throwing up errors. Specifically, when I delete a subform record using SQL I get 'record was already deleted by another user'; I think I might have fixed the problem with Me.Requery, but it feels really inefficient.

Should I be using an unbound control? If yes, how do I make an unbound control that can edit or add new records?

View 6 Replies View Related

Forms :: Multiple Values For Query On Form

Dec 17, 2013

I have a database and on the main table one of the columns is "Status". The values in that column can be either "Worked, Unworked, or Overdue".

I would like to be able to create a form so that the user can run a query and select which Status' they want to see. For example maybe they only want to see Unworked and Overdue so they can select those and run the query.

View 4 Replies View Related

Forms :: ComboBox Populated By Query Not Showing Values

May 9, 2013

I have a form for data entry that have multiple comboboxes. I am trying to get one combobox to base its "list" on an entry from a previous combobox. The first combobox is based on a QuantityType table and has four options.

The next combobox is based on a ProductDesign table and will have close to fifty options. I want to limit the ProductDesign combobox based on the QuantityType selection which will give the QuantityTypeID. This will refer to the QuantityTypeID linked to the ProductDesign table.I have created a query that looks like this:

SELECT Product_Design.Product
FROM Product_Design, Quantity_Type
WHERE Product_Design.QuantityTypeID = Quantity_Type.QuantityTypeID
AND Quantity_Type.QuantityType = [Forms]![Product]![Qty_Type];

This Query works and if I simply run the query I get the needed information from it.What I would like to do with this query is to populate the ProductDesign combobox with this data.I have tried putting the query in the RowSource field but I get an empty combobox without the data. The strange this is that the combobox must be getting something from the query because the length of the combo box varies based on my QuantityType selection. I.E. if I select "Single" in the QuantityType, the ProductDesign dropdown shows three empty places for data whereas if I select "Multiple" in the QuantityType I see that there is ten empty places for data.getting the combo box to actually show each option?

View 1 Replies View Related

Forms :: How To Create A Query On Lookup Of Multiple Values

Oct 19, 2013

I wanted to create a form where you can select multiple values from the table "years" and on a button it would open a query displaying all the records in "students" in those years selected.

View 3 Replies View Related

Forms :: Calculate Difference Between Two Query Table Values?

Nov 27, 2014

I am struggling with calculate difference between two query table values, I first created a make a table query(current meter reading) which contains one column called "meter read" , and I created a second make a table query(previous meter reading) which also contains "meter read" column, I linked those two make table queries to calculate the value difference between two date, how can I create a form to calculate diff between any two date?

View 3 Replies View Related

Forms :: Passing Operator Values To Criteria Field In Query

Mar 11, 2014

I have a query which contains figures. i have a search form based on this query and need to search using comparison operators such as <10000 or >500.

Is there a way to pass these value to criteria field in query ?

View 14 Replies View Related

Forms :: Default Values Disappear If Put Values In Text Boxes

Sep 17, 2013

In Access 2010 I have a Data Entry Form on which I have an unbound textbox in the header that the user can put a default date in. In the body of the form is a bound textbox that records the date and the default value is set as =defaultdatestat (obviously the name of the box in the header).

Problem: The default date shows up perfectly until a value is put in any of the other text boxes.

For further info : If you put values in text boxes default value disappears; if you then push escape the default value reappears when the values in the text boxes disappear.

View 4 Replies View Related

Forms :: Allowing Different Values In One Field Depending On Selected Values Of Another

Nov 22, 2013

I have several result fields which are all drop down lists. I want each result field's drop down list values to be different depending on the selected value of the Test1 drop down list.I came up with using the .rowsource keyword. My syntax seems to be fine but I'm not getting any values under the result fields when I run the form.Here is my code so far:

Private Sub Test1_AfterUpdate()
If Me.Test1 = "Stress Echo" Or Me.Test1 = "Stress SPECT" Or Me.Test1 = "Stress PET" Or Me.Test1 = "Stress MRI" Then
Me.Test1Result2.RowSourceType = "Value List"
Me.Test1Result3.RowSourceType = "Value List"

[code]...

View 14 Replies View Related

Custom Generated Number

May 10, 2005

Quote by Pat Hartman
>>>BTW, one somewhat undesirable thing happens when you go with replication. Access changes ALL your autonumbers to random instead of sequential. That means that from that time on, all new autonumbers will be assigned randomly to minimize the problem of conflicts between the design master and replica sets. A random autonumber can range from a very small negative number to a very large positive number. These autonumbers can no longer be used as your customer numbers or order numbers if these numbers are ever printed or given to the customer to be used for reference. A customer probably will be confused by an order number = -2. If this is going to cause you a problem, you'll need to switch to custom generated numbers. Post back for details if you need them.<<<<

I'd be interested in getting some details. Data will be entering that table through a data entry form and through appending from a second copy of the DB. I want to make the PK a random autonumber but then when the second DB is added to the Master DB have the table in the Master DB assign each record a "prettier" more usable id number. I know this is stupid but I'm not sure how to relate code to a table (there's no before update event for a table as far as I'm aware).

Thanks for any help you can give.

Stephanie

View 1 Replies View Related

Duplicate Autonumbers Being Generated

Mar 11, 2006

I have an orders database using Ac2K. Main tables are:
tblOrders: Has OrderID which is autonumber, key index (no duplicates)

tblOrderDetail: Has OrderDetailID --long integer

Tables are related in one to many relationships on OrderID-OrderDetailID with both cascades set.

Database is split with tables and front end on server. I can't put front end on desktops because users can access from any of over 600 computers in the school district even tho there are not all that many simultaneous users.

Data is input on main form bound to tblOrders. When user puts in required information (Date,Vendor other etc.), I save record and autonumber generates a new OrderID. The subform window then opens and user then inputs the details of the order to the tblOrderDetail. There can be multiple entries here.

Form and subform are linked by their ID fields as master-child.

PROBLEM: System which runs on network with 2-3 simultaneous users is unstable. It works for a while (maybe 10-20 orders) and then crashes. The subform window is blank (never opens).

When I examine the tables directly I found these problems:

1) Two of the OrderID's (autonumbers) are the SAME! They are usually right above and below each other and usually tied to the same user altho other order info may be different. I don't see any data "collision" if it's the same user. I thought this was IMPOSSIBLE.

2) There is an entry or two in the tblOrderDetail with ######### in one or more fields. The OrderDetailID field is blank. I once found the ######### in the tblOrders as well.

3) The key index is removed from the OrderID.

4) When I go to the relationships window either the link is missing or the cascade and integrity are no longer active. If I try to re-establish, I get a message about missing key index or unmatched data. If I then go and DELETE the records with the ##########, I can re-establish the relationship. And it works for awhile again.

5. Compact and repair doesn't fix anything.

6. One user "thinks" she saw a quick message about "time-out". Is there some setting in Access that I need to change (Tools-Options-Advanced?)

ANY ideas would be much appreciated. There is nothing worse than trying to work with a system that works most, but not all, of the time.

View 4 Replies View Related

Tables :: ODBC Imported Tables / How To Ensure Index Is Created

May 13, 2015

I am currently using Microsoft Access 2010 32bit, and have one database acting as parent, with a second linked database as a client for people to work with, and the parent database has tables imported from Sage V21 via ODBC. I have used the following code as specified in other examples as follows:

Code:
DoCmd.TransferDatabase acImport, "ODBC Database", "ODBC;DSN=MyDNSMachineName;UID=MyUID;PWD=MyPassword;LANGUAGE=us_english;" & "DATABASE=pubs", acTable, "INVOICE", "INVOICE"

one of the tables has 10k records in it, it only transfers 77 records. After manually attempting an import via the ODBC wizard it finally lets me access all 10k records.I wish to have a single button click delete and import fresh tables without worrying if all the data is coming across.Also, when manually adding a table, I am usually asked by the wizard to specify an index, but with the code above, I am not offered that option and the tables come across with no index. I am led to believe that having tables that link to each other without an index is bad, so how do I ensure an index is created?

View 5 Replies View Related

How To Carry Forward A Record ID To Subform To Ensure Editing Right Record

Jul 31, 2015

I am having difficulty getting the right record to carry forward into a modal subform to edit/update information. The Request_nmbr is an autonumber field. The client can have multiple requests. When I open my subform, I can scroll through the records, but when I launch the "update" button, I don't know how to carry forward the request_nmbr so that I'm updating the right record.

Here's my code:
Private Sub Btn_Exception_SubModal_Click()
DoCmd.OpenForm "Frm_Exception_UpdateModal", acNormal, , acFormAdd
Forms! [Frm_Exception_UpdateModal]![Request_nmbr].value = Me![Request_nmbr].value
Forms! [Frm_Exception_UpdateModal]![clientnmbr].value = Me![clientnmbr].value
End Sub

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved