• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

MS Access 2000: Filtering via combo boxes?

Uconn411

Member
I have been looking all over google and its newgroups on how to do this. I haven't yet found a full proof way. I am looking to take a combo box "Category" that has fields such as computer, monitor, printer, etc..., and once a user makes a selection, the combo box below it called "Model" will display the correct info. For example, if a user selects "Monitor" from the "Category" combo box, the combo box "Model" should only display monitors, not pc or printers. Thanks for any help.
 
Basically you want to set the rowsource property of the 2nd combo box during the afterupdate event of the 1st combo box.

Now what you set the rowsource to is up to you, you could set it to seperate queries you created or you could roll your own select statement.


If you want to dynamically create the row source, you could do the following in an afterupdate event:

combo2.rowsource="select model from partstable where category='" & combo1 & "';"
combo2.requery ' Makes the combobox refresh the data based on the new rowsource

This is just an example, I have no idea how your tables are laid out. Hopefully this gives you something to run with.



 
I was also considering check boxes for filtering. So, I could setup checkboxes for "Computer", "Monitor", "Printer" etc... and filter the results for the combo box below this, based on what the user selects. I think this is possible....
 
Back
Top