Macro to run multiple reports

P

Peter Kinsman

At the end of each quarter, I produce a number of reports, each driven by a
parameter query which asks for the quarter-end date, generates the
quarter-start date by adding one day and subtracting three months, and lists
the transactions using
Tran_date Between start_date And end_date
It would make sense to group these in a macro, but because of limitations in
SetValue, do I need to use a module instead? It is further confused because
the EndDate parameter in he query is used to format the title of the report.
I tried to use an invisible textbox in the report to hold the value, but
this hasn't worked yet either, so I wondered if anyone had been successful
in anything similar.

Many thanks

Peter Kinsman
 
G

Guest

hi,
I have some experence there.
I created a small print form. i used the docmd.openreport
method to run the reports. I put the date parameter in the
form and all the queries use that as parameter.
tran_date between [forms]![myform]![start_date] and
[forms]![myform]![end_date]
 
L

Larry Daugherty

HI Peter,

You could solve your issues with a "Launcher form" which is an intermediate
form that will gather the dates for the quarter and the start date and end
date each in their own textbox. The Launcher Form will have a Print command
button that opens your report. Refer back to the appropriate text box on
the Launcher for the required values. from the text box for the title and in
the criteria lines in the query. Obviously, you have to leave the form open
while your report is executing.

HTH
 
Top