If say clicking a Command Button processes many lines of code, in many modelus, you just put your error handling in the first event which is the Command Button
[tt]
Private Sub Command1_Click()
On Error GoTo Errhandler:
Call MoveNext
ErrHandler:
...
End Sub
Private Sub MoveNext()
Call ChangeRecLocation ("Next"
End Sub
Private Sub ChangeRecLocation (ByVal MoveDirection as String)
...
...
Call DisplayRec
...
End Sub
Private Sub DisplayRec()
...
... An error Occurs Here
...
End Sub
[/tt]
Now If the error occurs deep down 3 subs in it will kick back out to the first error handler in the Click event. Craig, mailto:sander@cogeco.ca
"Procrastination is the art of keeping up with yesterday."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.