Error Handling (Handle by number) 
Author Message
 Error Handling (Handle by number)

All,

In a single module I have the statement "On Error Goto MajorError." The label
MajorError has underneath, a Select Case Err.Number series of known errors that
will occur and should handle each one differently. Why does Access only find the
first error and then by default gives me an error description of the second
instead of handling it at the MajorError label and corresponding number?

This can't be that hard.

What am I missing?

EG



Fri, 07 Jun 2002 03:00:00 GMT  
 Error Handling (Handle by number)
I don't understand.  What is it you say is happening?

--

Quote:

>All,

>In a single module I have the statement "On Error Goto MajorError." The
label
>MajorError has underneath, a Select Case Err.Number series of known errors
that
>will occur and should handle each one differently. Why does Access only
find the
>first error and then by default gives me an error description of the second
>instead of handling it at the MajorError label and corresponding number?

>This can't be that hard.

>What am I missing?

>EG



Fri, 07 Jun 2002 03:00:00 GMT  
 Error Handling (Handle by number)

Two errors may occur in this module (3078 & 3043). They may occur one right
after the other. The On Error Goto MajorError seems to work only once and then
the default message "Run Time Error,etc. appears for the second error versus
going to the MajorError label and dealing with the second error (Select Case
err) . I hope this clearer.

EG

Quote:

>I don't understand.  What is it you say is happening?



Sat, 08 Jun 2002 03:00:00 GMT  
 Error Handling (Handle by number)
I wonder if you have an "On Error" statement in your error handler that is
disabling the error trap when you resume.  Also, how do you resume execution
after the first error?  Would you like to post the code?

--

Quote:

>Two errors may occur in this module (3078 & 3043). They may occur one right
>after the other. The On Error Goto MajorError seems to work only once and
then
>the default message "Run Time Error,etc. appears for the second error
versus
>going to the MajorError label and dealing with the second error (Select
Case
>err) . I hope this clearer.

>EG


>>I don't understand.  What is it you say is happening?



Sat, 08 Jun 2002 03:00:00 GMT  
 Error Handling (Handle by number)
I made an "ugly" work around for the time being because of time constraints. The
module is quite large so I going to do some tinkering with a smaller version
"inducing errors". I am probably missing something obvious. I will post the
smaller version if when I return from the holidays if I still can't make sense
of it. Thanks for you help.

EG

Quote:

>I wonder if you have an "On Error" statement in your error handler that is
>disabling the error trap when you resume.  Also, how do you resume execution
>after the first error?  Would you like to post the code?



Sat, 15 Jun 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to get the number of free Handles or the number of used handles

2. Error Handling Is not Handling

3. Error handling & line numbers

4. Adding line numbers to code for error handling

5. Error Handling - Which numbers to use ?

6. xBase Error: Invalid Handle Number..

7. Application handle from mutex handle?

8. VB5: convert VB file handle to OS file handle

9. Window Handle based on Instance Handle???

10. Handling a Handle...?

11. -~=###--WHAT IS THE DIFFERENCE BETWEEN HANDLED EVENTS AND UN-HANDLED EVENTS?---#=~-

12. ActiveX control to handle mouseover event handling?

 

 
Powered by phpBB® Forum Software