Print to network printer

esskaykay

Registered User.
Local time
Today, 08:38
Joined
Mar 8, 2003
Messages
267
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
 
In Page Setup there is a place to specify a printer. Make sure it's set to Default instead.
 
Thanks, that did it. I probably set that a few years ago and forgot about it (this old brain just aint doin what it used to).

Thanks again,
SKK
 
No problem; drove me crazy the first time it happened to me (and to this day I don't think I set it; it set itself!).
 

Users who are viewing this thread

Back
Top Bottom