Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Control determined by a query decides the next action ???

Status
Not open for further replies.

jane30

Programmer
Nov 14, 2000
92
US
The question sounds familiar? I think so, too. But I didn't get a good answer after having gone thru the knowledge base.

I have a subform with 3 bound text box controls: StartDate , EndDate & HospCode based on a query "Qry1". The first two have only one value. HospCode has 6 values: AA, BB, CC, DD, EE, FF. Currently it asks users to manually enter HospCode. If users need all, they have to enter all six. Doesn't make sense, right? I totally agree. But I don't how to create a default value --- "All" with my limited knowledge about Access. Any idea?

many many thanks in advance
 
Assuming you only have one field to keep track of one or more HospCode's, you could set the default value of the HospCode textbox in your subform to be "AA, BB, CC, DD, EE, FF". This default will then be shown for every new record in the subform.
 
Thank you,twinmill! How to show "All" for default value, instead of all six hospcode?
 
Jane:

Change your textbox to a Combo Box then and you can put in a value list that has all, but the bound column contains the AA,BB,CC,DD,EE,FF.

ComboBox
ValueList: &quot;AA,BB,CC,DD,EE,FF&quot;,&quot;<ALL>&quot;,&quot;AA&quot;,&quot;AA&quot;,&quot;BB&quot;,&quot;BB&quot; etc...

Then the user clicks the down button or types the first letter and the combo goes to the correct code &quot;automagically.&quot;

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top