Article ID: 132027
Article Last Modified on 7/5/2002
Function SetCopies (MyReport As String, Copies As Integer)
Dim dm As zwtDevModeStr ' Structures defined in zwAllGlobals.
module_ in WZFRMRPT.MDA.
Dim DevMode As zwtDeviceMode
DoCmd OpenReport MyReport, A_DESIGN
Reports(MyReport).Painting = False
If Not IsNull(Reports(MyReport).PrtDevMode) Then
dm.rgb = Reports(MyReport).PrtDevMode
LSet DevMode = dm
DevMode.dmCopies = Copies
LSet dm = DevMode
Reports(MyReport).PrtDevMode = dm.rgb
DoCmd SetWarnings False
DoCmd DoMenuItem 7, A_FILE, 2 'This line saves the report.
DoCmd SetWarnings True
End If
Reports(MyReport).Painting = True
DoCmd Close A_REPORT, MyReport
End Function
DoCmd SetWarnings False
DoCmd SetWarnings True
End If
Reports(MyReport).Painting = True
DoCmd DoMenuItem 7, 0, 2, , A_MENU_VER20 ' Report|File|Save.
DoCmd Close A_REPORT, MyReport
End Function
Keywords: kbprint KB132027