printig report

J

JIM.H.

Hello,
With the following code, I am trying to set my default
printer and print the report and set the original printer
back as default. However myReport is not printed to the
printer I set, it is printing to another printer I have.

' get current default printer.
strDefaultPrinter = Application.Printer.DeviceName
' switch to printer
Set Application.Printer = Application.Printers
("myPrinter")
' print recalls
stDocName = "myReport"
DoCmd.OpenReport stDocName, acNormal
' switch vack to default printer
Set Application.Printer = Application.Printers
(strDefaultPrinter)

What is problem,
Thanks,
Jim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top