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!

conditional lookup tables (combo boxes)

Status
Not open for further replies.

uscitizen

Technical User
Jan 17, 2003
672
US
i have inserted a combo box on a form (which populates a field on the underlying table) with three possible choices, i.e. 'IRB', 'CCI' and 'N/A' which stands for the usual 'not applicable'. When the user chooses either of the first two (IRB or CCI) i would like the adjacent field/control on the form two show a drop down list of dates which the user must choose one from that are relevant to the choice he's just made (CCI or IRB). there are only eight possible dates which comprise the dates available under either choice.i would imagine that we first need to create a table to act as our looku list with two columns, one with the value CCI or IRB, the other having a date in it and i've created it with the 16 rows worth of information, sorted by the character field. what's the next logical step, assuming right thinking.

thanks for any help?
 
I would create another combo box (combo box 2)referencing the 16 row table you discussed. On exit from the first combo box or on enter of combo box 2 query that combo box to populate it depending on the value selected in combo box 1. I think this might be the easiest way since it is only one field. If there were more fields dependent on the value of combo box 1 I might suggest a subform, but with only 1 field to look up it isn' necessary.
 
i think i've taken this approach......

i created a query which used a sql command with a where clause restricting the results to those rows which had the same values in the 'conditioning' field. the query was designated the 'row source' in the combo box field i put onto the form. then, (i read this somewhere but i dont' know where exactly) i put macro with a re-query (of the combobox field) into the three level (IRB, CCI, N/A) field (on enter i think).

it seemeth to work, BUT i wish it didn't force the user to have to enter the IRB or CCI value -- what i thought it would do was to automatically adjust the values in the combo box with the dates that were conditioned on IRB or CCI. this is kind of klu-gee, but i guess it's just a minor inconvenience.

at any rate, many thanks for the reply.

best wishes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top