help with command button option

DougM

Registered User.
Local time
Today, 05:41
Joined
Apr 18, 2004
Messages
26
Hi,

I have a command button set to automatically print a report when clicked. What I was wondering is there anyway to make the command print out multipule copies of the same report? (i.e. you click the button and 3 copies of the report print out)

Thanks for all the help!
Doug
 
DougM said:
Hi,

I have a command button set to automatically print a report when clicked. What I was wondering is there anyway to make the command print out multipule copies of the same report? (i.e. you click the button and 3 copies of the report print out)

Thanks for all the help!
Doug

A macro with 3 actions

OpenReport
PrintOut You have the option to enter the number of copies
Close
 
In the OnClick event of your print button...
Code:
    Dim stDocName As String

    stDocName = "YourReport"
    DoCmd.OpenReport stDocName, acViewPreview
    DoCmd.PrintOut acPrintAll, , , , 3
 
Code:
Private Sub cmdExample_Click()
    Dim intCounter As Integer
    For intCounter = 1 To 3
        DoCmd.OpenReport "rptExample", acViewNormal
    Next intCounter
End Sub
 
The amazing world of syntax and semantics. :)
 

Users who are viewing this thread

Back
Top Bottom