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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Print a DataReport on two different printers?

Status
Not open for further replies.

ChuyBCh

Programmer
Dec 14, 2001
4
MX
Hi! I'm trying to print a datareport on two different printers but it always print on the same default printer.
does anybody knows how to set a printer as default?
It works when I print other things for example a form and change the printer but it doesn't work when I print a datareport. It is like if the datareport has set hard the printer default with no posibilities to change it.
I use this code for example:
For Each X In Printers
MsgBox X.DeviceName
If X.DeviceName = "HP LaserJet 2100 Series PCL 6" Then
Set Printer = X
Set DR1.DataSource = rs
DR1.PrintReport
Unload DR1
End If
If X.DeviceName = "HP LaserJet 5L" Then
Set Printer = X
Set DR1.DataSource = rs
DR1.PrintReport True
Unload DR1
End If
Next

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top