Parameter Query Question

T

Terry DeJournett

Is there a way to use a parameter query to print "X" number of copies of a
report.

I have a form with a command button that prints a report based on a query.
If I need 6 copies, I have to print the report 6 times. I can't hard code
the number of copies to print, because the number needed to be printed will
vary each time a report is printed. Sometimes 1 - sometimes 99....etc.

Any suggestions of help would be greatly appreciated.

Terry
 
K

KARL DEWEY

I do not know about 99 times but using a form to enter quanity, macro
condition to check count down number in the form, and update query to count
down will do.

I can not remember but I think a macro can only call it's self about 12 times.
 
T

Terry DeJournett

Thank you for trying to help, but I don't quite understand how to write this
in code.
 
M

Michel Walsh

Hi,


Under a button click event, you add the lines of code:


DoCmd.SelectObject acReport, "rptCustomers", True
DoCmd.PrintOut , , , , FORMS!FormNameHere!ControlNameHere




where ControlNameHere is the control, on the named (and open) form, having
the number of times you want to print the same report, "rptCustomers".
Replace rptCustomers, FormNameHere and ControlNameHere with the appropriate
names, in your case.



Hoping it may help,
Vanderghast, Access MVP
 
Top