Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error handling issue 1

Status
Not open for further replies.

mmandk9

Technical User
Nov 1, 2002
16
US
I have done some searching on the Internet and on this forum to see if I could find the answer to this without much luck. I may not be using the correct verbiage, so if this is answered already I apologize in advance - would you please direct me to the answer in that case.

Using Access 2003, I have a calling procedure (Sub Print) with error handling and a called procedure (Sub Combine) with error handling.

When an error is encountered in the Combine procedure, the application is going back to the error handling of the Print procedure.

The Combine procedure is a looping procedure. If it uses the error handling in the Combine procedure, it would handle the error being encountered without stopping the application. Since it goes to the Print procedure's error handling, it causes a big mess that requires a lot of manual processing to re-start the app.

Any ideas? This is our busy season and this is really slowing things down. Any help would be appreciated...Thanks!

MM
 
The most obvious place to start is to look through your Sub Combine for any instances of "On Error".

If one of them happens to be "On Error GoTo 0" then you have turned local error handling off and it will bubble up to the calling procedure.

I assume that you do have an "On Error GoTo ErrorProcedure" already in place.
 
Golom,

Thank you for your quick reply.

There is not an "On Error GoTo 0" in the Combine procedure but you did point me in the right direction.

In the Combine error handler, when writing to the log it was writing: Error.Number & ": " & Error.Description

It should be: Err.Number & ": " & Err.Description

Duh!

I am giving you a star for pointing me in the right direction! Thanks!

MM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top