Everything seems to work except the form does not print. I have paused all the printer defigned on my workstation and no print jobs go to any of the queus.
Am I missing something??
Thanks
John Fuhrman
Am I missing something??
Code:
Private Sub Print_Click()
On Error GoTo Err_Print_Click
Dim strDefaultPrinter As String
Dim strDepartmentPrinter As String
' get current default printer.
strDefaultPrinter = Application.Printer.DeviceName
MsgBox "Your default printer is " & strDefaultPrinter & ".", vbInformation + vbOKOnly, "Set Printer for Form"
'Set Printer to ILD Department Printer
Set Application.Printer = Application.Printers("Dell 2330dn Laser Printer") ' test desktop printer
'Set Application.Printer = Application.Printers("\\Z02RSCNRC02\NRC SEIT01 Dell Laser Printer 5310n") ' SEIT network printer
strDepartmentPrinter = Application.Printer.DeviceName
MsgBox "Your default printer is " & strDepartmentPrinter & ".", vbInformation + vbOKOnly, "Set Printer for Form"
DoCmd.RunCommand acCmdSelectRecord
DoCmd.PrintOut acSelection
'Reset Default Printer
Set Application.Printer = Application.Printers(strDefaultPrinter)
Exit_Print_Click:
Exit Sub
Err_Print_Click:
MsgBox Err.Description
Resume Exit_Print_Click
End Sub
Thanks
John Fuhrman