Use form combobox to trigger filtered query parameter

  • Thread starter Thread starter headly
  • Start date Start date
H

headly

Would like user to select an address from a combo box on a form bound to
tblAddress; That event will trigger a query to run that selects individuals
from tblPersonnel at that address; That query should trigger a report based
on people by address by one other criteria. Suggestions? Macros, VBA,
combination? TIA for any advice.
 
Here is what I would do:
1. You need your form, the query to find the individuals that live at the
selected address and a report based on that query.
2. In the After Update event of the form's combo box, enter code to open
your report. (DoCmd.OpenReport,"ReportName",etc.)
3. The query should contain all of the fields you want on your report. In
the Criteria area enter that the address must match the address on the form:
=[Forms]![FormName]![ComboBox] and whatever other criteria you want.

You can also put this criteria in your DoCmd line, but this is how I do it.
 
Back
Top