Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is There an Event for Print and Not Print Preview?

Status
Not open for further replies.

tbaguio

Programmer
Sep 25, 2000
41
CA
Is there a way to differentiate between the action of printing out a report and looking at a report in Print Preview?

I have an OnPrint routine that logs the user and date whenever any reports are generated. Unfortunately, I only want to log users that have printed out the report and not those that print preview the report. By default all my "Print" buttons launch a report in Print Preview so it can be assumed that at some point they will be looking at the document but not printing it. Currently my code for the Print event logs both actions.

As anyone else had a similar problem?

Theresa "Sleep is the best meditation." - Dalai Lama
 
There are only three modes of opening reports:
Preview, PrintOnly, DesignMode. John Fill
ivfmd@mail.md
 
Theresa:

How have you provided for the users selection of preview or print?

If you only have a preview button and the users are then printing by clicking on the Printer Icon or selecting File/Print I don't think you can capture the print action to trigger your code.

What you might try is placing an option group on the calling form with Print and Preview options. I usually do this to eliminate the need for two command buttons; I just change the button caption based on the user selection. In your case, you could test the option value and if Print was selected run your On-Print code.

You would probably have to create a custom menu bar to exclude the File/Print and also remove the tool bars.

This will at least give you the capability to distinguishing between a print and a preview event.

Hope this helps.
Larry De Laruelle
larry1de@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top