how to tell if ms access report is printing

  • Thread starter Thread starter howard
  • Start date Start date
H

howard

I need to distinguish in code whether MS access (97 or XP)
is printing or previewing. e.g. in the On Activate event
what property do I use to indicate if the output is going
to the sceen or printer? The reason is that I need an audit
trail of whether print is chosen.
 
The Activate event fires only when the report is previewed. Trouble is, you
probably want to let the user print from the preview, and at that stage
you're stuck.

A better approach might be to record into your audit table the primary key
values of the records being printed *before* the report is open. The
RecordSource for the report is then a query joining your audit table with
the other tables, and the user can reprint the batch again at any time.

This assumes that you open the report from a form (i.e. you don't let the
user anywhere near the database window). The command button that creates the
new batch executes an Append query that writes the batch to your audit
table, and then opens the report.
 
Back
Top