Pass value to determine number of reports?

spoole

Registered User.
Local time
Today, 02:58
Joined
Oct 23, 2007
Messages
81
Hi,

I have a table (Tbl_All) which amoungst other columns has the feilds "OrderNumber" and "Pages" (pages contains the number of copies of that report I wish to print.

So

OrderNumber has a value of "A". Pages has a value of "5"



I have created a report with a page break at OrderNumber, giving me a report page for each order number. Is there a way to pass the value in "Pages" into the DoCmd.PrintOut command?

So, I would have a button on a form to run the report based on the above table. Order number "A" will print 5 copies of the report?
 
1. Remove the page break
2. Pass the OrderNumber in the WHERE argument of the OpenReport method:
http://baldyweb.com/wherecondition.htm
3. After the OpenReport line, call the PrintOut method with the right arguments as indicated below:
Code:
DoCmd.PrintOut [COLOR=Red][B]acPages[/B][/COLOR], , , , [COLOR=Red][B]PagesRequired[/B][/COLOR]
 
Thanks, will give it a go!
 

Users who are viewing this thread

Back
Top Bottom