a2k set printer before printing reports

supmktg

Registered User.
Local time
Today, 13:43
Joined
Mar 25, 2002
Messages
360
I am printing several reports at one time from a command button. I would like to set the printer (same for all reports) for these reports before I open them. I cannot find a way to do this in access 2000.

Currently, I use this code, but it opens the print dialog for each report:

Code:
          DoCmd.OpenReport "rpt1", acPreview
          DoCmd.RunCommand acCmdPrint
          DoCmd.Close acReport, "rpt1"
          
          DoCmd.OpenReport "rpt2", acPreview
          DoCmd.RunCommand acCmdPrint
          DoCmd.Close acReport, "rpt2"

          DoCmd.OpenReport "rpt3", acPreview
          DoCmd.RunCommand acCmdPrint
          DoCmd.Close acReport, "rpt3"

I'm trying to do this:
Code:
          Set printer for rp1 = "Printer 1"
          DoCmd.OpenReport "rpt1", acNormal
          
          Set printer for rp2 = "Printer 1"
          DoCmd.OpenReport "rpt2", acNormal

          Set printer for rp3 = "Printer 1"
          DoCmd.OpenReport "rpt3", acNormal

All of the code samples I find are 2003 or later. There are references online to printer utility code for A2000 from Albert Kallal, but all of the links are broken.

Can anyone help?

Thanks,
Sup
 

Users who are viewing this thread

Back
Top Bottom