OnPrint ??? MS Access gets it wrong?

wjoc1

Registered User.
Local time
Today, 17:08
Joined
Jul 25, 2002
Messages
117
Hi,

Unfortunately my patience with MS Access is wearing thinner and thinner by the day now. I tried to do a very simple thing this morning. I have a form which previews a report - fine. Now if the user decides to print this report I want that to trigger the printing of another report also. Simple right?

So I though I would use the OnPrint event of the report to trigger the printing of the second report. Apparently the print event for the report actually has NOTHING to do with the report printing at all. I quote from the help file "The Print event occurs after data in a report section is formatted for printing, but before the section is printed".

So what these geniuses are saying is that the print event occurs when sections of the report are formatted and no event occurs when the report actually prints. Am I reading this right?

Maybe it's just my way of interpreting things. Is this right? and if so why why why why? Can someone offer a sol to my problem? All I want to do is catch the real print event when it happens.

Thanks,
Liam
 
wjoc1 said:
I have a form which previews a report

Are you using the snapshot viewer control to view the report on a form? Are you using the print button on the control to print the report?
 
How will Access or even Widows know if the Report printed? Either use a message box on the UnloadEvent of the Report, or take a chance and just print it anyway
 
Rich said:
How will Access or even Widows know if the Report printed? Either use a message box on the UnloadEvent of the Report, or take a chance and just print it anyway

That's my point. I would have though the OnPrint event for a report would be generated when the report printed but my brain works differently I guess :-)

rich said:
Are you using the snapshot viewer control to view the report on a form? Are you using the print button on the control to print the report?

I am calling the report using DoCmd.OpenReport from vb within the form. When the report comes up I go to File->Print.

Is there anyway I can detect when a user decides to print a report. I presume I could come up with some custom menu toolbar with a special print button but it should be way way easier than this
 
Disable the menu in the report, by placing =1 in the reports Menu Bar properties, and create your own that prints both reports. You can do this very easily by creating a macro to print both the reports and dragging the macro to the menu bar. I'll do a quick example if you get stuck.

HTH
 
Last edited:
___ said:
Disable the menu in the report, by placing =1 in the reports Menu Bar properties, and create your own that prints both reports. You can do this very easily by creating a macro to print both the reports and dragging the macro to the menu bar. I'll do a quick example if you get stuck.

HTH

Thanks for the offer of an example but figured I'd have to go down this road so hopefully I'll scrape something together :-) Thanks
 

Users who are viewing this thread

Back
Top Bottom