• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Error Handling: Preparing fo... > Preventing Your Own Error Handling f...

Preventing Your Own Error Handling from Being Invoked

When you are testing your application, you do not want to trigger your own error handling. Instead, you want to activate VBA's own error handling. The trick is in the Options dialog box of the Visual Basic Editor (VBE). Choose Tools, Options and click the General tab. Enable the option Break on All Errors located in the Error Trapping section. As long as this option is set, your error handling is ignored, and Access's default error handling is invoked. Using this setting, you can turn error handling on and off from one central location.

Other settings for error trapping are Break in Class Module and Break on Unhandled Errors (the default). With the latter setting, handled errors do not cause the application to enter break mode. Unhandled errors do cause the project to enter break mode and place you, or the user, on the line of code that invoked the error handler. The Break in Class Module option causes only unhandled errors in a class module to invoke break mode.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint