We have looked at this issue on this forum and elsewhere. Seems to be a common problem with no solution that we are able to find. Should be simple.
No problem switching from the default printer to the label printer and printing a label. Big problem switching back to default printer after printing a label.
If we comment out the line that actually prints labels, the printers switch back and forth with no problem.
If we actually print a label (DoCmd.RunCommand acCmdPrint), the code to select the default printer doesn't work. No errors. Printing the label "freezes" the label printer as the default printer.
Code:
Public Function PrintLabels()
Dim prtDefaultPrinter As Printer
strReport = Application.CurrentObjectName
Select Case strReport
Case Is = "tblLabels"
Set prtDefaultPrinter = Application.Printer ' set default printer
Set Application.Printer = Application.Printers("Brother QL-570 LE") 'swith to label printer
DoCmd.OpenReport "rptLabels", acViewPreview
DoCmd.RunCommand acCmdPrint 'prints to label printer
Set Application.Printer = prtDefaultPrinter ' DOES NOT RESET TO default printer
DoCmd.Close acReport, "rptLabels", acSaveNo
End Select
End Function