Passing values to a query/report

  • Thread starter Thread starter James Rasmussen
  • Start date Start date
J

James Rasmussen

I have a form that has 3 combo boxes. I need to pass the values of these
boxes to a query that is the source for a report.
How can this be done?
TIA
Jim
 
Refer to the form in the query. How are you wanting them passed, as criteria to limit a
field? If so, set the criteria to

[Forms]![frmMyForm]![cboMyCombobox]

The form has to be open for this to work. If you are opening the form as a "pop-up" in the
Open event of the report, then use the acDialog window mode option to halt the report's
code until you make your selections. Have a button on the form to hide the form when you
are done (Me.Visible = False). Hiding or closing the form will allow the report's code to
continue to run. A hidden form is still open, so you can get the values from it. Remember
to close the form when you close the report.
 
Back
Top