Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Unanswered: docmd.openquery and pass the query with the param to auto print

    I need to have a document print out on legal-sized paper, landscaped. In order to do this, I changed the orientation and paper size, but I've discovered that this would also need to be passed to autoprint. How would I code this?

    Following is the code I have for this thus far:


    Private Sub cmdPrint_Click()
    On Error GoTo ErrHandler

    Dim strSQL As String
    Dim strQryName As String
    Dim strMsg As String

    strQryName = "frmSubOpenQryTrans"

    DoCmd.OpenQuery "frmSubOpenQryTrans"

    Printer.Orientation = acPRORLandscape
    Printer.PaperSize = acPRPSLegal

    strMsg = "Your query has successfully printed."
    strSQL = Nz(Me.txtSQL2.Value, "000")

  2. #2
    Join Date
    Oct 2003
    Provided Answers: 1
    What about bringing up print dialog:

    DoCmd.RunCommand acCmdPrint

    you will be able to choose your paper, printer, number of copies, ....

  3. #3
    Join Date
    Oct 2003
    That would be the simplest way, actually.

    Thank you.

Posting Permissions

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