I have a form with a button that prints a report. However, we installed a new printer but the button is still attempting to print to the old printer. I have looked at the code but can not tell where it is calling out the printer name. Is there a way to hard code in specific printer for a specific report?
Here's my code from the “OnClick” event:
______________
Private Sub cmdPrintPermit_Click()
On Error GoTo Err_cmdPrintPermit_Click
Dim stDocName As String
If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord
End If
stDocName = "rptPermit"
DoCmd.OpenReport stDocName, acNormal, , "[RECORD] =" &_ Forms!frmPermits!Record
Exit_cmdPrintPermit_Click:
Exit Sub
Err_cmdPrintPermit_Click:
MsgBox Err.Description
Resume Exit_cmdPrintPermit_Click
End Sub
_________________
Thanks,
SKK
Here's my code from the “OnClick” event:
______________
Private Sub cmdPrintPermit_Click()
On Error GoTo Err_cmdPrintPermit_Click
Dim stDocName As String
If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord
End If
stDocName = "rptPermit"
DoCmd.OpenReport stDocName, acNormal, , "[RECORD] =" &_ Forms!frmPermits!Record
Exit_cmdPrintPermit_Click:
Exit Sub
Err_cmdPrintPermit_Click:
MsgBox Err.Description
Resume Exit_cmdPrintPermit_Click
End Sub
_________________
Thanks,
SKK