Ctrl+P prints the Form not Report being Previewed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sierra7
    Recognized Expert Contributor
    • Sep 2007
    • 446

    #1

    Ctrl+P prints the Form not Report being Previewed

    Hi,
    I have a Sales Order form from where I can print either a Sales Order Acknowlegement, a Delivery Note or an Invoice.
    When printing the Delivery Note (DN)the user wants to manually select either a dot matrix printer with multipart stationery, or a laser printer in which case she enters that she wants 3 copies.
    To do this she has been able to open the DN in Preview mode then used Ctrl+P to open the print dialogue box to make the selection.
    Since I have changed the underlying Form to be Unbound, we find that the Form prints-out rather than the Report we are viewing.
    I'm using Access 2010 front with SQL-S 2008R2 backend.
    Also using DoCmd.Maximize in Resize event of DN Report to attempt to maintain focus on the report.
    The Bound version of the form still prints the DN as expected but the Unbound version still seems to retain focus and print itself.

    Anybody any ideas what I am missing??
    Many thanks in advance.
    S7
  • sierra7
    Recognized Expert Contributor
    • Sep 2007
    • 446

    #2
    An update on this post:
    It seems it is a matter of 'which document has focus?'
    The previewed report must be given focus by clicking on it(even when it is maximised full screen) for Ctrl+P to print it rather than the underlying form.
    Have not resolved why this is necessary when the underlying form is Unbound and not when it is Bound.
    Have now avoided the problem by calling an InputBox to allow the user to enter number of copies, so avoiding Ctrl+P .
    S7

    Comment

    • jimatqsi
      Moderator Top Contributor
      • Oct 2006
      • 1293

      #3
      Very interesting situation. So the ctrl-P is just doing what it does, it's the focus that is misbehaving. I suppose you could also bind the report to some meaningless one-row recordset to overcome what is apparently a bug or "undocument ed feature", lol.

      Jim

      Comment

      Working...