Are you trying to change the printer before opening up the viewer, or are you wanting to print the report apart from the viewer?
To change the printer prior to opening the viewer, use vb's common dialog control, as in:
CommonDialog1.ShowPrinter
Or, Loop through the Printers collection, selecting the desired printer:
Dim prt as Printer
For each prt in Printers
If prt.DeviceName = Trim(MyFrom.cboPrinters.Text) Then
Set Printer = prt
Exit For
End If
Next
To print the report to a printer without opening the viewer, use code similar to the following (again, assuming the user is given a form to select the printer and then click on a command butto to start the print job):
Dim prt as Printer
For Each prt In Printers
If prt.DeviceName = Trim(MyFrom.cboPrinters.Text) Then
Set Printer = prt
report.SelectPrinter prt.DriverName, prt.DeviceName, prt.Port
'if you need to change the paper orientation, do it here
'report.PaperOrientation = crLandscape
Exit For
End If
Next
'The False argument means don't prompt the user for the number of copies to print and starting page number; use True if you want the user to choose those settings
report.PrintOut False