Problem printing report using "Print" button in ribbon

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bre1603
    New Member
    • Jul 2010
    • 39

    #1

    Problem printing report using "Print" button in ribbon

    I have a multi-user database in Access 2007. One user is having trouble printing a report in print preview.

    The report is opened from a form using a command button. Both the form and report seem to be working fine. But when she clicks the Print icon in the Access Ribbon while viewing the report (in print preview), a screen shot of the form prints out, instead of the report.

    No other users seem to be having this problem. And it doesn't make any sense to me. Is it a settings issue? Or a fluke?

    She can get around it by right clicking and selecting Print from the shortcut menu. Using this method, the report is printed correctly. However, this isn't ideal for the user, and I would like to solve this issue all together.

    Any suggestions?

    Thanks in advance,

    Bre
  • bre1603
    New Member
    • Jul 2010
    • 39

    #2
    I believe I was finally able to overcome this issue.

    After finding several more users were having a problem printing the report using the Ribbon, I looked closer at the form’s command button code and compared it to other forms that seemed to be working fine.

    What I found was a bit of code that worked fine in older versions of Access, but with our migration to 2007, it started causing problems.

    The old code is as follows:

    Code:
    DoCmd.OpenReport "rpt_A19_2A", acPreview, "qry_A19_2A_Detail", "[Current_Document_Number]=[Forms]![frm_Payments_by_A19]![Current_Document_Number]"
    Changing the acPreview to acViewPreview seemed to solve the problem. Now all users can Print from the Ribbon and the report prints as it should.

    The new code:

    Code:
    DoCmd.OpenReport "rpt_A19_2A", acViewPreview, "qry_A19_2A_Detail", "[Current_Document_Number]=[Forms]![frm_Payments_by_A19]![Current_Document_Number]"
    Hopefully, others can use this information to solve their own issues with printing from the Access 2007 Ribbon.

    Comment

    Working...