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.
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.