Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Code to send form to network printer in Access 2000

Status
Not open for further replies.

briansmithdanisco

IS-IT--Management
Jun 13, 2007
19
US
I have tired adding code to send a form to a network printer. The problem I have is the code does not work in Access 2000.

This is the basic set-up I tried, but the compiler did not like the "As Printer" or the "Application.Printer".

Dim prtDefaultPrinter As Printer
Const REPORT_PRINTER As String = "\\ad1\diusk01\newc034"
Set prtDefaultPrinter = Application.Printer
Application.Printer = Application.Printers(REPORT_PRINTER)
DoCmd.PrintOut
Application.Printer = prtDefaultPrinter

Any suggestions?
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top