Hi all,
I'm have a bit of trouble getting an error handler to work properly. In my code I am calling a function based to which I pass a string variable (think of it as a CustID fields).
When the function can not find any data that relates to the string I get an "Item is missing" error; my error handler drops the code down to the end of the function, which then resets a couple of other variables and loops back up to the original function. The idea is to call the function a slightly different way the second time through (like querying a different table).
The problem is that if/when the function STILL can not find the data and the error is returned VB does NOT drop down the the error handler a second time (where I have code that should deal with this eventuality).
I am unclear as to why the code does not capture the error a second time. I even tried putting the On Error GoTo right after the label to which I loop back up; still only works once.
Any ideas?
Oliver
I'm have a bit of trouble getting an error handler to work properly. In my code I am calling a function based to which I pass a string variable (think of it as a CustID fields).
When the function can not find any data that relates to the string I get an "Item is missing" error; my error handler drops the code down to the end of the function, which then resets a couple of other variables and loops back up to the original function. The idea is to call the function a slightly different way the second time through (like querying a different table).
The problem is that if/when the function STILL can not find the data and the error is returned VB does NOT drop down the the error handler a second time (where I have code that should deal with this eventuality).
I am unclear as to why the code does not capture the error a second time. I even tried putting the On Error GoTo right after the label to which I loop back up; still only works once.
Any ideas?
Oliver