print command button- multiple copies

K

Karen TS

I have a print command button on my form. Is there a way to get it to print 3
copies when it is selected only one time? Or do I have to select it 3 times?
 
F

fredg

I have a print command button on my form. Is there a way to get it to print 3
copies when it is selected only one time? Or do I have to select it 3 times?

Print the Form itself? Never!!
Create a report with just the data you need.
(If you need the actual form with all of it's buttons and background,
etc., select the form, right-click and select "save as ... report".)

Then code that command button click event:

DoCmd.RunCommand acCommandSaveRecord
DoCmd.SelectObject acReport, "ReportName", True
DoCmd.PrintOut acPrintAll, , , , 3, 0

Look up the various arguments needed in the SelectObject and PrintOut
methods.

All you need do is save the form once as a report. Anytime after that
simply run this report and the data will be current.

Note: the above will print every record in the table that the form is
bound to.
It's best to create an actual report and filter the data as needed in
the report's record source.
 
Top