Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Location
    Netherlands
    Posts
    11

    Post Unanswered: Action after printing??? Not after previewing!

    Hi,

    I have a report which everybody can preview and print. I want to insert the date and time (now() ) into the database when the report is printed.

    I have set the code on the Reports onPrint action. The problem is that if someone previews the report, it runs also the code I want it only when the report is actually printed.

    And because the report has variable pages the use of 'printcount' doesn't work.

    Anyone idees?

  2. #2
    Join Date
    Dec 2004
    Posts
    4
    I don't know if this is an option for you, but if you are calling the report from a form, you could just add two buttons. One to preview the report, and one to print the report. Under the preview button, all you would need is:
    Code:
    DoCmd.OpenReport "Your_Report_Title", acViewPreview
    And under the print button:
    Code:
    DoCmd.OpenReport "Your_Report_Title"
    'Code To Add Log Here
    Hope that helps.

    Scott

  3. #3
    Join Date
    Dec 2004
    Location
    Netherlands
    Posts
    11
    I have also considerd that. But it is more user-friendly if someone can preview it and then press the print button instead of closing the report and then pressing a button.

    But thanks for the suggestion.

Posting Permissions

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