Combo & Option Box query (1 Viewer)

ian_ok

Registered User.
Local time
Today, 13:01
Joined
May 1, 2001
Messages
90
I seem to be on a combo query day today!

Can any tell me the easiest way to reduce the options available in combo boxes after the first choice is taken.

ie.
choice1combo
1
2
3
4
If choice1 = 1 then

choice2combo (will only allow this)
2
3
4

Also is a similar method available for use in option boxes.

Please don't go code mad on me!

Thank you Ian
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:01
Joined
Feb 19, 2002
Messages
43,302
Is one line of code and a small change to a query too much?

Edit the query you use as the rowsource for the SECOND combo so that it includes a Where clause (change the names appropriately):

WHERE YourTableField = Forms!YourFormName!YourComboBoxName;

Then in the AfterUpdate event of the FIRST combo add the following (again, adjusting for your field names):

Me.YourSecondCombo.Requery

That's it!
 

Users who are viewing this thread

Top Bottom