Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    77

    Unanswered: Print to network printer

    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

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Your problem is in the report itself ... That is where the binding to the old printer is at. Open the report in design view and bind it to either the default printer or to your new network printer ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jan 2004
    Posts
    77
    Thank you,
    SKK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •