Linked Combos

R

ricky

Hi

I am trying to create a pair of Linked Combo boxes, but cannot seem to
achieve this, is there a way I can do this. Both Combo are populated by a
query, but I would like the first combo to filter the second combo.

i.e
First Combo = Country
Second Combo = City

I would like the first combo to select a country and then the second combo
would only show cities in that country?

Is this possible?

Kind Regards

Rikesh
 
F

fredg

Hi

I am trying to create a pair of Linked Combo boxes, but cannot seem to
achieve this, is there a way I can do this. Both Combo are populated by a
query, but I would like the first combo to filter the second combo.

i.e
First Combo = Country
Second Combo = City

I would like the first combo to select a country and then the second combo
would only show cities in that country?

Is this possible?

Kind Regards

Rikesh

Leave the Second Combo Rowsource blank.
Code the first Combo AfterUpdate event to something like:

Combo2.Rowsource = "Select YourTable.City from YourTable Where
YourTable.Country = '" & Me![Combo1] & "';"

Change the table and field names as needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top