One Parameter open multiple Reports

A

AmandaH

I am trying to write a VB macro that will allow me to open up several
reports under one parameter.

For example I have 7 Reports, where the primary Key is ProjectNumber,
I want to be able to click a button and have a pop-up box asking the
user to enter a project number. I then want to take that value and
apply to each of the 7 reports, having each report open in print
preview. Where the only record in each report is equal to that of the
project number enter by the user.

I know that I could base this on a query parameter for each report;
however then the user would have to enter the project number 7 times
with is kind of a waste of time.

Any ideas would be great

Thanks
~Amanda~
 
P

Pat Hartman \(MVP\)

Rather than futzing with macros, create a form that gathers the needed
arguments. Add a button to the form to run the reports (each or as a
group). Use the where argument of the OpenReport method to control the data
selected by the reports. As an alternative, you can modify each of the
RecordSource queries for the reports so that it references the new form
field to obtain its parameter value rather than prompting for it.

To help you create the code to run the first report, let the button wizard
build it. then add additional OpenReport lines for each report.
 

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