Print multiple reports?

s15199d

Registered User.
Local time
Today, 18:44
Joined
Jan 4, 2005
Messages
10
Is it possible to open/print multiple reports?

If so how here's the code I'm using for just printing one...how do I add others?

Private Sub Print_Click()
DoCmd.OpenReport "Missing_Forms", acViewNormal
End Sub
 
Multiple

Try this:

Use the Printout Method of the Docmd object.

DoCmd.PrintOut [printrange][, pagefrom, pageto] _
[, printquality][, copies][, collatecopies]

For example, if I want to print out two copies of the first page of a report, I would use
DoCmd.OpenReport "rptCustomers", acViewPreview
DoCmd.PrintOut acPages, 1, 1, , 2

The following method which does not require the report to be in Preview mode.

DoCmd.SelectObject acReport, "rptCustomers", True
'This prints out two copies of the report
DoCmd.PrintOut , , , , 2
 
Thanks trucktime.

However, what I'm trying to do is slightly different. I don't need multiple copies of the same report. What I need is to be able to print several different reports based on the click of one button.

Maybe I should give further explanation of what I'm doing. I have a form with several reports listed on it. The user can click a checkbox next to each report title if they want to print that report. When they click the print button I want to be able to print all of the reports they have checked.

My guess is I need to concatenate all of the checked report names, but I haven't had luck with that yet.
 
Multiple

Sorry, I misunderstood.

Here is a sample mdb that does what you need using a macro.
Check the form and the macro and you'll understand how it works.
It only has the Preview option enabled, but you can easily
add the one for printing.

Good Luck.
 

Attachments

Almost...

THANKS Trucktime.

That's what I need. But, the macro is missing. The concept is there...i see what it's trying to do, and well it makes since. But, the actual macro they used to print based on which ones were checked. That macro is missing.

Do you know where I might be able to find it?
 
Macro

Like I said, the included macro only had the preview working.


Here is a new file with a complete macro.
 

Attachments

Users who are viewing this thread

Back
Top Bottom