Filtering Combo Box

S

sitreks

I have 2 combo box with the same data source. how can I
filter the second combo box data source so the list that
appear in second combo box only the data that match with
the field that have been selected in first combo box.
thank you
 
F

Fredg

If they both have the same data source, why not just show the data in the
one combo box?
Add more columns as needed.

However, to answer your question:

Leave the second combo box rowsource blank.

Code the first combo box's AfterUpdate event:

Combo2.RowSource = "Select * from YourTable Where [SomeFieldID] = " &
Me!Combo1 & ";"

You'll need to fill in the specifics as you gave no indication of table or
field names or what ever fields you wanted.
 

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