S
Sandy
Hi
I have the following code on a command button and it works fine other than
if someone forgets to turn the printer on.
Is there any code that can be incorporated to check if there is a printer
connected and in particular is switched on, and if it isn't then throw up a
message box (say "No Printer Available"), and then exit the routine?
Command Button code as follows:-
Private Sub cmdPrintSaveClose_Click()
On Error GoTo Err_cmdPrintSaveClose_Click
DoCmd.OpenReport "Customer Copy", acNormal
DoCmd.OpenReport "Workshop Copy", acNormal
DoCmd.OpenForm "Navigation", acNormal
Exit_cmdPrintSaveClose_Click:
Exit Sub
Err_cmdPrintSaveClose_Click:
MsgBox Err.Description
Resume Exit_cmdPrintSaveClose_Click
End Sub
Thanks
Sandy
I have the following code on a command button and it works fine other than
if someone forgets to turn the printer on.
Is there any code that can be incorporated to check if there is a printer
connected and in particular is switched on, and if it isn't then throw up a
message box (say "No Printer Available"), and then exit the routine?
Command Button code as follows:-
Private Sub cmdPrintSaveClose_Click()
On Error GoTo Err_cmdPrintSaveClose_Click
DoCmd.OpenReport "Customer Copy", acNormal
DoCmd.OpenReport "Workshop Copy", acNormal
DoCmd.OpenForm "Navigation", acNormal
Exit_cmdPrintSaveClose_Click:
Exit Sub
Err_cmdPrintSaveClose_Click:
MsgBox Err.Description
Resume Exit_cmdPrintSaveClose_Click
End Sub
Thanks
Sandy