Hi,
I have a program that read though a file and load the data into an database. Sometimes there's a problem in the file and and error is generated. I use 'on error goto' to deal with the error. When the user has dealt with the problem I jump to the begining of the function to start over agian.
The problem:
The first error is dealt with fine, but when the second error is generated (I use err.raise) it comes up with the error meassage instead of jumping to the error handler.
In the end of the errhandler I have: err.clear
In the begining of the function I have: on error goto
What's the problem?
Any help will be appreciated
Sunaj
This is an illustation of my function:
Function LoadFile
TryAgain:
on error goto ErrHndl
'lot of code here with some err.raise
errHndl:
'here I deal with the error
err.clear
if .. goto TryAgain (else end)
end function
I have a program that read though a file and load the data into an database. Sometimes there's a problem in the file and and error is generated. I use 'on error goto' to deal with the error. When the user has dealt with the problem I jump to the begining of the function to start over agian.
The problem:
The first error is dealt with fine, but when the second error is generated (I use err.raise) it comes up with the error meassage instead of jumping to the error handler.
In the end of the errhandler I have: err.clear
In the begining of the function I have: on error goto
What's the problem?
Any help will be appreciated
Sunaj
This is an illustation of my function:
Function LoadFile
TryAgain:
on error goto ErrHndl
'lot of code here with some err.raise
errHndl:
'here I deal with the error
err.clear
if .. goto TryAgain (else end)
end function