Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Mar 2009
    Posts
    120

    Unanswered: Printing Double Sided

    Hi Everyone,

    Hope someone can tell me if this is possible and if so how to make it happen.

    I have a 2 page report in my DB that is printed by a button on a menu within the DB.

    The folks that utilize the DB would like this report to print double sided instead of on 2 seperate sheets of paper. Our printers are cablable of double siding anything if you tell them to. However is there soemthing I can do so that whent he button is clicked and the report is generated it will automatically double side the report rather then the user having to View the Report first and then going into the printer properties and selecting Double Sided?

    We are using Ricoh Copy machines as Printers in my company.

  2. #2
    Join Date
    Nov 2011
    Posts
    413
    This should get you started. Microsoft Access tips: Duplex reports.

  3. #3
    Join Date
    Mar 2009
    Posts
    120
    Thanks, however that is the opposite of what I am trying to accomplish. My report is only 2 pages long every time. It prints on 2 pages and I want it to duplex on 1 sheet of paper for the user instead of 2 seperate pages.

    Am using Access 2007.

  4. #4
    Join Date
    Nov 2011
    Posts
    413
    I suppose you have printer that will print that way?

  5. #5
    Join Date
    Mar 2009
    Posts
    120
    Yes our printers will duplex. The report doesn't automatically duplex like everything else we print. This particular report prints on 2 seperate pages but they want it to print duplex.

  6. #6
    Join Date
    Nov 2011
    Posts
    413
    DoCmd.OpenReport strReport, acPreview

    Dim rptReport As Report
    Set rptReport = Reports(strReport)

    If rptReport.Printer.Orientation = acPRORLandscape Then
    rptReport.Printer.Duplex = acPRDPVertical
    Else
    rptReport.Printer.Duplex = acPRDPHorizontal
    End If

  7. #7
    Join Date
    Mar 2009
    Posts
    120
    Burrina,
    Thank you for the code. Is there anything in it that I need to alter for my specific report as I am not real familiar with the SQL Code that access uses and where do I place this code?

    Also, if my report is not a landscape report do I need to do anything special for that as it is a portrait report.

  8. #8
    Join Date
    Nov 2011
    Posts
    413
    Of course is Report is a Landscape you would have to adjust or leave out all together. Of course edit to the name of your Report.

  9. #9
    Join Date
    Mar 2009
    Posts
    120
    THanks again, but am not sure exactly what your saying in your last post as far as leaving out all together and edit to the name of my report.

    Could you do the code again, with "myreport" where my report name shoudl go and what it should be for a Portrait report? Again, I don't know SQL so am not real sure what to do here.

    Where do I place this Code what part of the report or what event?

  10. #10
    Join Date
    Nov 2011
    Posts
    413
    That was air code. I don't have a printer to test it. The code does allow for what your printer is set to as the default print method.Sorry for the confusion. In the middle of some very difficult coding myself here. Use the code (As Is) on the OnOpenEvent of your Report.Test to see if it will work for you.

    Good Luck!

  11. #11
    Join Date
    Mar 2009
    Posts
    120
    Sorry for being such a pain. But, Where and HOW do I put my report name into this code? Again, I don't know SQL and really don't know what I am doing here.

  12. #12
    Join Date
    Nov 2011
    Posts
    413
    I was wrong when I suggested that! Need another cup of coffee! Just use the code as is. No Report name necessary! The code sets the report to your Printer settings. I can't test it for you, so this is as far as I can go.

  13. #13
    Join Date
    Mar 2009
    Posts
    120
    I put the code in as is.

    Private Sub Report_Open(Cancel As Integer)

    DoCmd.OpenReport strReport, acPreview

    Dim rptReport As Report
    Set rptReport = Reports(strReport)

    If rptReport.Printer.Orientation = acPRORLandscape Then
    rptReport.Printer.Duplex = acPRDPVertical
    Else
    rptReport.Printer.Duplex = acPRDPHorizontal
    End If

    End Sub

    But when I got to run it I get the following Error:

    "Run-time error '2497':
    The action or method requires a Report Name argument."

  14. #14
    Join Date
    Nov 2011
    Posts
    413
    Private Sub Report_Open(Cancel As Integer)

    DoCmd.OpenReport strReport, acPreview

    Dim rptReport As Report
    Set rptReport = Reports(strReport)

    If rptYourReportName.Printer.Orientation = acPRORLandscape Then
    rptYourReportName.Printer.Duplex = acPRDPVertical
    Else
    rptYourReportName.Printer.Duplex = acPRDPHorizontal
    End If

    End Sub

    This code is supposed to open your report from some command button or code.
    Unless you post a sample db, I'm afraid I can't help anymore. And I don't have a double sided printer to test the code.
    Good Luck With Your Project.

  15. #15
    Join Date
    Mar 2009
    Posts
    120
    Thanks for the assistance. However the code doesn't seem to work on the Open Event in my report.

Posting Permissions

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