Access 2000 reducing query parameter prompts in reports

J

J Sedoff

I have created several reports in Access 2000 each using several
queries/subreports. When I run the reports, I get prompted for query
parameters. At this point, all of the parameters that I am asking for are
for the same date (the report determines the loss for the plant on [enter
date] ex: "7/9/08"), so each query keeps asking the user for the date over
and over again. Is it possible to start each report with prompting the user
once for the date and through some means (code, macro, etc) pass it on to the
other parameter prompts so I don't have to type in the date 2-4 times per
report, depending on the report.

The main reason I ask is that I have a macro that runs several of these
reports to create the final report that is handed out and I am tired of
typing in the date 15 times, when I think it should really only be asking me
for the date once; however, I do have two reports that need to use the
previous day, rather than the usu. day (ex: for the final 7/9/08 report,
those two reports would need to use 7/8/08 instead).

Is this possible?

Thanks, Jim Sedoff
 
F

fredg

I have created several reports in Access 2000 each using several
queries/subreports. When I run the reports, I get prompted for query
parameters. At this point, all of the parameters that I am asking for are
for the same date (the report determines the loss for the plant on [enter
date] ex: "7/9/08"), so each query keeps asking the user for the date over
and over again. Is it possible to start each report with prompting the user
once for the date and through some means (code, macro, etc) pass it on to the
other parameter prompts so I don't have to type in the date 2-4 times per
report, depending on the report.

The main reason I ask is that I have a macro that runs several of these
reports to create the final report that is handed out and I am tired of
typing in the date 15 times, when I think it should really only be asking me
for the date once; however, I do have two reports that need to use the
previous day, rather than the usu. day (ex: for the final 7/9/08 report,
those two reports would need to use 7/8/08 instead).

Is this possible?

Thanks, Jim Sedoff

Use a form to enter the date parameters into instead of a query
prompt.

Change the query parameter from ...
[Enter Date]
to
Forms!FormName!ControlName

As long as the form is open, all queries will get their parameters
from the form and you will not be prompted. Close the form when the
reports are all printed.

For those reports that use the previous day, then change the query
criteria for those report to:
DateAdd("d",-1,Forms!FormName!ControlName)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top