Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running two reports at once

Status
Not open for further replies.

SchoonDog

Programmer
Dec 13, 2002
10
CA
Hi all,

I would like to run two reports by running only the first one.

ie) Run report A and report A and report B run and open.

Thanks,

SD
 
Also I would like to use the same parameters from Report A in Report B.
 
To accomplish this you may have to change how you approach running reports. I imagine to run a report containing a parameter you have been entering brackets [] in the criteria field. This conveniently prompts Access to ask the user for data.

Unfortunately there is not a way to feed this parameter to your query unless you change the method for capturing user input. There are a few different ways to accomplish this. I will recommend the following course of action.

Add an "on open" event to report a. This on open event will do a few things. In the on open event use an input box to capture your parameter. Once you have stored this parameter in a public variable set the Me.Recordsource equal to your SQL statement inside the on open event. String in the value of the public variable into the Me.Recordsource SQL statement.

Depending on how you want to launch the reports, you can assign an on close event to the report A to launch report B. In the on open event of report B assign the me.recordsource to by stringing the public variable into your SQL statement.

Good luck!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top