Selection of a Printer

G

Guest

On 19-12-2004 in an aswer to my same topic Mr. Ken Snell - MVP wrote the
following code for selecting a printer :
Set Application.Printer = Application.Printers("DeviceName")

Based on that I made a command Button and wrote the following code to select
one of my printer and print the report (my PC is attached with 2 Printer, One
on parralled port - (Name = Epson LQ-2180) and other one on USB port (Name=hp
Deskjet 920c)). The code I wrote was.

Private Sub Label0_Click()
DoCmd.OpenReport "EmplRepo5", acNormal, "", ""
Set Application.Printer = Application.Printers("Epson LQ-2180")
End Sub

Its shows error on the printer selection line code.

Please advise what code lines I should add to obtain this.
 

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