I have a standard "error trap" in a form..
On Error goto ...
lable
mesbox
call exit lable
label
exit
however i keep getting a "blank" error then an error that says to resume w/o
error.
any ideas?
You need to put Exit Sub (or Exit Function if you're dealing with a
function) before the code for your error handler:
On Error GoTo Err_Routine
' code
End_Routine:
Exit sub
Err_Routine:
' code
Resume End_Routine
Note the use of Resume in the error handler. That ensures that the error is
cleared from the stack. Any cleanup that's required whether or not the
routine is successful would go into the End_Routine block before the Exit
Sub line.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I have a standard "error trap" in a form..
>
[quoted text clipped - 12 lines]
>
> any ideas?
Mike - 19 Sep 2007 17:14 GMT
thanks for the info. i'll try that after lunch.
why does the the exit have to go before the error?
> You need to put Exit Sub (or Exit Function if you're dealing with a
> function) before the code for your error handler:
[quoted text clipped - 31 lines]
> >
> > any ideas?
Douglas J. Steele - 19 Sep 2007 19:14 GMT
If you don't put the Exit, code execution will continue into the error
handler.
Access has no way of knowing that you only want to run the error handler
code when there's an error.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> thanks for the info. i'll try that after lunch.
>
[quoted text clipped - 37 lines]
>> >
>> > any ideas?
>I have a standard "error trap" in a form..
>
[quoted text clipped - 11 lines]
>
>any ideas?
Please post your actual code and the actual error message. There is nothing in
Access called "mesbox", "call exit lable" is meaningless, and the error
certainly doesn't say that.
John W. Vinson [MVP]