Consulting

Results 1 to 2 of 2

Thread: Access 2007 Print to Specific Tray

  1. #1
    VBAX Tutor
    Joined
    Jan 2005
    Location
    Greenville, SC
    Posts
    220
    Location

    Access 2007 Print to Specific Tray

    This may be very simple. I just don't know how to do this.
    I need code to print a particular report to a specific Tray
    I need to print to Tray 3

    Here is the code I currently have:

    Function PrintRequestReportMacro()
    On Error GoTo PrintRequestReportMacro_Err
    
    
        DoCmd.Echo False, ""
        DoCmd.GoToRecord acForm, "FrmRequestForWO", acNext
        DoCmd.GoToRecord acForm, "FrmRequestForWO", acPrevious
        DoCmd.OpenReport "RequestforWORpt", acViewPreview, "", "[RequestWOQry]![RequestID]=[Forms]![FrmRequestForWO]![RequestID]"
        If (Forms!FrmRequestForWO!NoChargeWO = True) Then
            Reports!RequestforWORpt!NoChargeWO.Visible = True
        End If
        If (Forms!FrmRequestForWO!NoChargeWO = True) Then
            Reports!RequestforWORpt!RequestNoChargeLabel.Visible = True
        End If
        If (Forms!FrmRequestForWO!NoChargeWO = False) Then
            Beep
            MsgBox "Put a green sheetof paper in the printer then hit OK", vbInformation, ""
        End If
        If (Forms!FrmRequestForWO!NoChargeWO = True) Then
            Beep
            MsgBox "Put a Purple sheet of paper in the printer then hit OK", vbInformation, ""
        End If
        DoCmd.PrintOut acPrintAll, 1, 1, acHigh, 1, True
        DoCmd.Close acReport, "RequestforWORpt"
        DoCmd.GoToRecord acForm, "FrmRequestForWO", acNewRec
        Exit Function
    
    
    
    
    PrintRequestReportMacro_Exit:
        Exit Function
    
    
    PrintRequestReportMacro_Err:
        MsgBox Error$
        Resume PrintRequestReportMacro_Exit
    
    
    End Function

  2. #2
    VBAX Contributor
    Joined
    Oct 2011
    Location
    Concord, California
    Posts
    101
    Location

Posting Permissions

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