Example:
Code:
strPrinter = Application.Printer.DeviceName
DoCmd.OpenReport strReport, acViewPreview, , "Submit.LabNum='" & strLabNum & "'", acWindowNormal, strMode
If strPrinter Like "*Konica*" Then Reports(strReport).Printer.Duplex = acPRDPSimplex
Reports(strReport).Printer.PaperBin = acPRBNAuto
If Not strRDC Like "*X" And strPrinter Like "*Konica*" Then
'Set the report destination paper bin to Tray 2 to print on yellow paper
Reports(strReport).Printer.PaperBin = acPRBNLower
End If
If strPrinter Like "*Konica*" And booPage2 = True Then
Reports(strReport).Printer.Duplex = acPRDPHorizontal
End If
'print page 1 of report if not Konica printer, otherwise print full report to Konica
If intView = vbNo Then DoCmd.PrintOut acPages, 1, IIf(booPage2 = True And strPrinter Like "*Konica*", 2, 1)
If strPrinter Like "*Konica*" Then Reports(strReport).Printer.Duplex = acPRDPSimplex
Reports(strReport).Printer.PaperBin = acPRBNAuto
'print page 2 of report if there is one and not Konica printer
If intView = vbNo And booPage2 = True And Not strPrinter Like "*Konica*" Then
If Not strPrinter Like "*Konica*" Then MsgBox "Add paper or turn sheet over to print on reverse then click OK.", vbApplicationModal, "Print"
DoCmd.PrintOut acPages, 2, 2, , IIf(strPrinter Like "*Konica*", 1, 2)
End If