Run 3 reports through a macro, but only ask 1 report criteria o...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created an Access data base and I have created a macro to run 3
reports at once.

Each report has the same report criteria EG: Date from: / Date to, and I am
wondering how to run these reports without having to answer the same question
3 times.

If anyone can help it would be greatly appreciated.
 
Carol,

Make a simple form with two unbound text boxes (or DTPicker or Calendar
ActiveX Controls!) for the From and To dates; I'll assume the form's name to
be frmCriteria, and the two controls to be named ctlFromDate and ctlToDate
respectively.
Go the the query that serves as each report's record source, and change your
criteria under the date field to:
= Forms![frmCriteria]![ctlFromDate] And <= Forms![frmCriteria]![ctlToDate]

or something along these lines, depending on how you want the criteria
applied. This will result in the queries (=> reports) "reading" therir date
range directly from the form, so as long as the form stays open you won't be
asked to provide input three times.

This done, go back to your form design and add a command button to run the
macro, and it's all on one form, enter the dates and click the button!

HTH,
Nikos
 
Back
Top