• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 46
  • Last Modified:

Return DB results based on combobox selections

Community -

I'm working on a simple database that will be presented used internally to perform a simple filter operation on the entire recordset based on selections made from two combo boxes. I've got the first part figured out, but I'm drawing a blank on the filtering component. I'm looking for the most efficient way to achieve this.

The workflow should go as follows:

 - User selects an industry from the Industry combo box (this filters the second box)
 - User selects sub-industry from Sub-Industry combo box

At this point - a subform/query should return the results that correspond to the selection made in the combo boxes from the table breachArticleInfo.

As always - I appreciate the time!
  • 2
1 Solution
The subform should be bound to a query with criteria that references the two combos.

Select ...
From ...
Where fld1 = Forms!yourmainform!cbo1 AND fld2 = Forms!yourmainform!cbo2;

Either use a button's click event or the Click event of the second combo to requery the subform.


Using this method, the subform will be empty when you open the form.
Workable solution
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now