We help IT Professionals succeed at work.

MS Access Print report to the default printer

wildm4n
wildm4n used Ask the Experts™
on
how do i print a report to the default printer
sometimes people change where their report will be sent and the owner wants it to default to their main office printer if possible
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chris BRetired

Commented:
Access will print to the default printer *by default*. If you want it to print to a specific printer then you must set this in the report page setup. Presumably those who are printing elsewhere are changing their default printer to something else. If you set a specific printer, their change will have no effect.

Chris B
Most Valuable Expert 2012
Top Expert 2013
Commented:
This will print a report to whatever the default printer is on the user's machine:

Docmd.OpenReport "YourReportName", acViewNormal '< --- Normal view is the default, and sends the report to the defaut printer.

Open in new window

You can change Access's default printer dynamically like this:


Dim strHoldDefPrinter as string
' Remember the current default printer. 
strHoldDefPrinter = Application.Printer.DeviceName & ""

' Change the default printer
Set Application.Printer = Application.Printers("Some other Printer")

'Print to that specific printer
DoCmd.OpenReport "YourReport", acViewNormal

' Ensure that you return to the original default printer
Set Application.Printer = Application.Printers(strHoldDefPrinter)

Open in new window

Author

Commented:
thanks