multiple reports from one button (1 Viewer)

Paddy1980

Registered User.
Local time
Today, 02:19
Joined
Jan 29, 2009
Messages
18
Hi

I have looked through past posts but can't quite match what I am looking for.

I have a set of existing reports (4 in total) that asks for the same criteria (a specific date) in each report. Currently I have a form with one button per report.

Is it possible to have one button that will run all 4 reports? I have tried to incorproate it all into one button in VBA but it requests the date 4 times for each individual report of the 4.

Can you have it ask for the date once and apply it to all 4 reports?

I can't (as in not allowed to) change the existing reports from the existing 1 button per report form so possibly need to do all the code in the new one click button.

Any suggestions?
 
Last edited:

namliam

The Mailman - AWF VIP
Local time
Today, 03:19
Joined
Aug 11, 2003
Messages
11,695
If your getting 4 prompts from the reports this is becuase the reports have a parameter in them.

If you cannot change the reports PERIOD (which IMHO is total nonsence) then you cannot change the parameter which will make doing this very hard...
Instead the easy way is to have the form (with the buttons on it) have a date control, this date control is then referenced by the reports instead of having a parameter for the date. Then running the 4 reports is as simple as executing the 4 docmd's ...
 

Paddy1980

Registered User.
Local time
Today, 02:19
Joined
Jan 29, 2009
Messages
18
If you cannot change the reports PERIOD (which IMHO is total nonsence) then you cannot change the parameter which will make doing this very hard...

Ok so this is very hard but if you had to go this route how would you do so?

Instead the easy way is to have the form (with the buttons on it) have a date control, this date control is then referenced by the reports instead of having a parameter for the date. Then running the 4 reports is as simple as executing the 4 docmd's

Otherwise I suppose to do it the easier way may be my only option (which I suppose I will have to refer to other posts for help)...
 

namliam

The Mailman - AWF VIP
Local time
Today, 03:19
Joined
Aug 11, 2003
Messages
11,695
Well its pretty simple really.

Just stick a date control on the form
Then edit the reports to use the form instead of the parameter, you can use a browse functionality to find the proper syntax for it.

The hard way I am not even sure how it exactly works for Reports, but for queries if they have parameters you can have code to apply values to said parameters before you actually open the query (from code)
I expect something simular to be possible with reports, but like I said... not sure 100% if and/or how possible.
 

Users who are viewing this thread

Top Bottom