Results 1 to 2 of 2

Thread: Error Trapping

  1. #1
    Join Date
    Dec 2002
    Posts
    60

    Unanswered: Error Trapping

    I have inherited a large database. It has 50+ forms, many modules etc. My goal is to streamline to a simpler database (it was created by someone w/ no Access experience).

    My question concerns error trapping. I want to record all errors that occur with the forms and code in a table for future review. I have a sub that will do this, I just need to call the sub when an error occurs. As I understand Access XP, error trapping only occurs at the procedural level, so I have to put 'On Error' in every procedure of every form-mucho work (since the original author did not).

    Has anyone come up with a method to trap errors on the module or entire project level? Any suggestions are welcome.

    Thanks.

  2. #2
    Join Date
    Feb 2004
    Posts
    142
    If a form does not have any code behind it then you can do error trapping on the form level in the on_error form event. Place your code there. If there is code then every procedure must have an error trapping process. You can use a public sub for the actual code but the call to it must be in the error trapping portion of each sub.
    KC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •