Printing multiple copies of 5 different reports by clicking a button

Jill

Registered User.
Local time
Today, 23:20
Joined
Feb 21, 2000
Messages
18
I'm really hoping that someone could give me some pointers on how to do this. I have set up a form where the end user enters a begin date and end date, clicks on a command button and prints 4 different reports for a neighborhood one right after the other. This works great.

Now, the end users want to be able to select the number of copies and collate them. How do I do this? The macro I use right now behind the command button just opens the report and prints. In the macro, I tried adding select object, then printout, putting in five copies. And that works, but it defeats the whole purpose of each report printing back to back and saving the person the collating time. If I do it this way it prints rpt1-5x's, rpt2-5x's, rpt3-5x's, rpt4-5x's instead of rpt1&rpt2&rpt3&rpt4-5x's.

Is there any code or any command that I can add to the macro to let the user select the number of copies, but still have the reports print one right after the other?

Please help! Any advice at all will be greatly, greatly appreciated.

Thanks in advance!

[This message has been edited by Jill (edited 12-10-2001).]
 
In VBA, I would recommend using a FOR NEXT loop to repeat the report print cycle an arbitrary number of times, but I couldn't find anything in Access help to cover loops in a macro. Is Visual Basic an option for you? Loops are simple there!
 
Thanks, KKilfoil.

I am not that familiar with VBA, but I'm willing to give it a shot. Do you (or anyone else) know where I could get an example of code to work with?

Thanks a lot!
 
Here Jill this is what you want to put in there:

Dim looptimes, count As Integer

looptimes = InputBox("Enter a number of prints")
For count = 1 To looptimes
DoCmd.OpenReport "MyReportName", acNormal, ""
Next count


Regards

Mike
 

Users who are viewing this thread

Back
Top Bottom