Microsoft Access 2010 breakpoint and "stop" command not stopping code

I have a microsoft access 2010 application running in 2003 mode. There is an issue with code that runs a report called from a form. The code in the report activate event and other events will not stop when breakpoints and "stop" commands are set.
pabrannPresidentAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
...can you post the code?

Also take a look at your error trapping options in VBA.
"Break on all unhandled errors" is the default

Also can you clarify what you mean by:
microsoft access 2010 application running in 2003 mode
?
0
PatHartmanCommented:
Make sure you are opening the report in print preview or normal mode.  The code doesn't run in report view.
0
pabrannPresidentAuthor Commented:
I think I may have a hint as to the issue: when I issue the following:  DoCmd.OpenReport stDocName, acViewNormal

The breakpoints and "stop" code is bypassed. If I change the "acViewNormal" to "acViewPreview" they appear to work.
In my opinion this should not be the case but it appears so.
0
Nick67Commented:
:)
In my opinion this should not be the case but it appears so.
Opinions don't count in architecting of a program of which you aren't the author.
https://support.office.com/en-ca/article/Order-of-events-for-database-objects-e76fbbfe-6180-4a52-8787-ce86553682f9#bm5
Open --> Activate --> Close --> Deactivate

Now, Activate is when something becomes the active item in the Access UI.
deactivate is when something stops being the active item in the Access UI.
Printing does NOT show you the object hence when printing you have effectively
Open --> Close

In general, when printing, Access behaves like the run-time version--it may only break for you on errors or required input.
It's nothing new, in that regard.
It can make it tough to test some parts of your functionality without wasting paper, though!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pabrannPresidentAuthor Commented:
Perfect, thank you all very much!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.