OnOpen event fails to fire when Report opened from VBA code

P

Peter Fletcher

For reasons which I probably needn't go into, I am trying to use a Report's
OnOpen event to change some of its printer settings on the fly. The code
works fine as long as I print the Report directly from the normal Access 2007
interface, but it is part of an Application that uses the runtime, so it has
to be run from VBA code.
If I use DoCmd.OpenReport "MyReport", acParameter with anything except
acNormal substituted for acParameter, the onOpen code runs and does what it
is supposed to do. If I use acNormal (which is what I need to use, of
course!), it appears that the OnOpen event is not triggered, and the code
attached to it does not run. I Googled an old thread describing behavior like
this, unfortunately without a resolution. Has anyone seen this before and/or
have a suggested workarround.
 

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