Send Report (or Labels) to Specific Printer...
Sometimes you want a Report or your Labels to go a specific Printer but you don't want it to become the Default Printer for all of your Reports. Now you could open each Report that you want to go to a different Printer, go to Page Set-Up and set each one individually. But what happens when the Printer gets replaced or moved? What happens if each Department has their own printer, not on the Network but, in their area? Here is one solution using a Settings table that can be adjusted by you or the End User.
The difficult I do immediately, the impossible takes a little bit longer.
Dim strDefaultPrinter As String
Dim strPrinterName As String
'Get current default printer.
strDefaultPrinter = Application.Printer.DeviceName
'When storing the Printer name be sure to include the full path and the Printer name, i.e. \\NetworkPath\PrinterName
strPrinterName = fncSetting(25)
'If *hardcoding* the Printer name then use the below.
'Note, this way defeats the purpose should the Printer name or location change.
'strPrinterName = "\\NetworkPath\Name of the Printer Goes Here"
'Switch to the other Printer
Set Application.Printer = Application.Printers(strPrinterName)
If Me.NewRecord Then
DoCmd.Close acReport, "rptYoutReportNameGoesHere", acSaveNo
'Switch back to original Default Printer
Set Application.Printer = Application.Printers(strDefaultPrinter)
Code for fncSetting() found here.