Access JumpStart 2.0 | Blog

A Rapid Development Framework for Microsoft Access

So the reason I was getting strange behavior in some tests I was running was because there was a third party class which responsibly used an error handling scheme used in it’s tests which required an error being raised with Err.Raise to pass up to the calling code.

I had enabled an option called “Break in Class Module” in the VBA Editor in Tools->Options… General tab. Normally error handling is set to “Break on Unhandled Errors”

This was causing the Err.Raise in a class instance to be handled by the system error handler in all situations.

In any case, by changing the option to “Break on Unhandled Errors” this caused the tests that were expecting errors to run properly.

My tests yesterday were not subject to this problem because the subroutines were being run in a normal module.

Tomorrow I will break down the error tests I was doing and show how errors are being propagated with and without error handlers in functions and nested functions.