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