Report with Different Criteria (Conceptually)

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi Folks - I have a report based on a query. If I need to pass different
criteria to the query, I usually build a form that collects the criteria,
then pass that form criteria to the query. However, once I do this, the
criteria form I built must be open for the query to run. To get around this,
I sometimes pass the form criteria to one of the arguments of the
DOCMD.OPENREPORT command. This technique allows me to keep the query
criteria "clean", BUT building the WHERE argument for the OPENREPORT command
can be tricky (all those quotes and double-quotes). The bottom line is I
only want one query/report to run with the ability to pass different sets of
criteria. I do NOT want to create multiple versions of reports and queries.
Does anyone use other techniques? Thanks for your feedback.

Michael
 
There is no shortcut for this, you would still have to specify the critera.
The OpenReport method you are using is the best. You will just have to
struggle with the quotes thing til you understand it.
 
Back
Top