|
-
Jun 4th, 2000, 06:46 PM
#1
Thread Starter
Junior Member
I`m hoping someone can explain how On Error is properly used. From what I can understand, you place the On Error before a piece of code that may generate an error. When the error is generated, the program jumps to the error handling code and deals with it. The problem I am having is how do you define the scope of the error.
For example, If I place an On Error before the code...
On Error DealWith:
Evil code that generates an error when accessing a database because of NULL
DealWith:
Code to display an error message, etc..
If no error is generated then will the program not jump to the DealWith the next time an error is generated. Also, how do you stop the code under DealWith from being executed. I really don`t understand. Perhaps I have got this wrong but should it not be more like a function with a clear beginning and end so that it is only called when an error is created. PLEASE HELP !!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|