Filtering Combo Box

  • Thread starter Thread starter sitreks
  • Start date Start date
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
 
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.
 
Back
Top