Dynamic Query Criteria

stevepain

Registered User.
Local time
Today, 15:28
Joined
May 15, 2006
Messages
12
Dear all,

I want to generate a different drop down box dependent upon the criteria of another selection on a form.

For example, when the user selects "fish" from the drop down, the query criteria lists only those animals whose animal type is fish. If the user selects "reptile" from the first drop down, the query criteria changes, so the next drop down box lists those animals whose animal type is reptile.

To summarise:

Choices in drop down 1:
Fish
Reptile

Choices in drop down 2:

If Drop down 1 = Fish
Cod
Haddock
Shark

If Drop down 1 = reptile
Snake
Lizard

Is this possible, and how do I go about structuring it.

Thanks,

Steve
 
This is usually referred to as cascading combos and there are tons of posts here on the topic. Searching should get you some details but essentially, you use queries with criteria that reference the "parent" combo and you requery "child" combos in the AfterUpdate event of the "parent" combo.
 

Users who are viewing this thread

Back
Top Bottom