report - no Open event fires - Acc2003

W

will eichert

I'm emailing a report via email using DoCmd.SendObject in Access 2003.
It works fine, but I wanted to run some code in an event before the
report is sent. Seems simple enough. For some reason, the events (I've
tried the Open, Activate, even Error) don't seem to happen when the
report is invoked by SendObject. If I just open the report manually, I
get both the Open and the Activate event.

I've searched the archives, but can't find any info on this. Is there
something special I have to do to enable these events? Is this a bug
in Access 2003?

Here's my SendObject command:
DoCmd.SendObject acSendReport, myReport, acFormatRTF,
"myemail@mydomain", , , "email subject", "email body text", false

Thanks for any help,

Will Eichert
 
W

will eichert

Sorry about the previous post, it is inaccurate. The Open event is
indeed happening.

I was fooled because my breakpoint in the 1st line of the event code,
was never hit. I still don't know why. Anyway, the code in the Report
event procedures was running. Errors of my own in that code caused an
early exit from the code (although the errors were AFTER the
breakpoint), so coupled with the breakpoint not tripping, I thought
the code was never executing at all.

Will
 
W

will eichert

Sorry about the previous post, it is inaccurate. The Open event is
indeed happening.

I was fooled because my breakpoint in the 1st line of the event code,
was never hit. I still don't know why. Anyway, the code in the Report
event procedures was running. Errors of my own in that code caused an
early exit from the code (although the errors were AFTER the
breakpoint), so coupled with the breakpoint not tripping, I thought
the code was never executing at all.

Will
 

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

Similar Threads


Top