Access 97 report printing problem

H

howard

I need to record when a user sends a report to the printer
(specifically, each page of the report is a letter, and I
need to record the report name and letter recipient). I
don't want this information recorded on Print Preview, just
on Print. Conceptually, I need to attach code to the
File/Print menu option which triggers on the OnPrint event
of the Detail section of the report. I can't work out how
to do this, so have a combo of reports and 2 buttons, one
for print preview only, the other which enters print
preview, immediately calls RunCommand acCmdPrint to print
the report and close it. A hidden check box - chkPrint -
records which button is clicked, if print preview then the
file/print menu option and print toolbar items are
disabled. Code from the OnPrint event in each desired
report calls a public module sub which examines chkPrint
and, if true, inserts an audit record of the adressee and
report name. This works BUT seems like a sledgehammer to
crack a nut, and for partial prints (e.g. print only page 1
of 100 pages, i.e. a letter to one adressee) gives spurious
events - the OnPrint event for page 2 is called. What I
really need is OnPrint to work only for printing, and not
print preview.
Is there an alternative ? can I suppress spurious events. ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top