Print a second report when the first report is printed

G

Guest

I am trying to print a second report when the user prints the first using
Access 2000. I tried using OnPrint() but it prints when the second report
even when the first report is only previewed. According to the microsoft
description of the OnPrint event this is correct as OnPrint occurs "before
the report is actually printed".

I really only want to print it when the user presses the print button
otherwise they might choose to cancel and the first report has already
printed. Does anyone know of another print event?
 
A

Allen Browne

There's not an easy way to determine whether the report was actually
printed, or just previewed.

If you send the report directly to the printer (without previewing), its
Activate event does not occur. But that doesn't help if you print from
preview.

You could create a custom toolbar and custom menu that fires your own code,
so you can trap whether the print occurs from preview. But even then, there
is still the possiblity that the report was not printed. For example, if the
use sends the report to a printer that is offline, or there is a paper jam,
or the printer the user sent it to was not a printer (e.g. the Adobe Acrobat
writer), or ...

Or you could use the report's Close event to ask the user whether the report
printed successfully. Of course, the user may not know the answer, or may
give the wrong answer, so that's less than desirable too.

Ultimately the question comes down to *why* you want to know, and how
crucial that is. I can't tell if this will be any use for you, but whenever
I really need to know what records printed, I create a batch containing
those records, and you have a trail of what was created when. Details in:
Has the record been printed?
at:
http://allenbrowne.com/ser-72.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

"Jeremiah Clinkerbuilt" <[email protected]>
wrote in message
news:[email protected]...
 
G

Guest

Thanks very much. I thought about the custom toolbar - I might do it that
way. It's not that crucial I suppose. Your answer was particularly thorough.
I perused your website before posting - a very useful resource!
 

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