General information
Category:
Coding, syntax & commands
I dooubt that the error procedure that is called is the Error() event of the form, because the line should read ON ERROR THISFORM.Error(). I've just tested it with your ON ERROR line and it bomb out, telling me that it couldn't find Error.PRG
I've notice also that the Error() event of the form isn't triggered if the error is inside a command button. It seem that the command button Error() event is fired first, then then ON ERROR take place, ignoring the form Error() event.
In my test, I've place the following line in the Click() event of the command button: a = "a" + 1
In the command button Error() event, I've put:
MessageBox("Error")
THISFORM.Release()
When running my form, I get the message box and the form close correcly.
I suggest that you trace your code to see exactly what method are called and see if your error handler is outside the form.
>That didn't release the active form though. Besides, I think 'THISFORM.RELEASE' is in the form because it is in the 'ERROR' event.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only