>Hi Rich.
>
>>So. Assuming that all of the following exist
>>
>>1. ON ERROR
>>2. Form Error Method Code
>>3.. Control Error Method Code
>>4. TRY/CATCH code
>>
>>What is the sequence in which the error checking takes place?
>
>Normally TRY takes precedence but if the TRY code calls a method of an object, that method causes an error, and that object has code in its Error method (or one of its ancestors do), the Error method is called. If it doesn't have code in Error, then ON ERROR executes. IOW, TRY only takes precedence for errors that occur directly in the code in TRY, not in methods called from TRY.
>
>Doug
Thank you Doug. But from the following code it seems that TRY/CATCH will take precedence for code in methods called from within the block, even if ON ERROR exists.
SET STEP ON
ON ERROR MESSAGEBOX("this is an error")
try
thisform.m1()
CATCH
ab=123
endtry
a = 1 + "A"
Stepping though the code the CATCH block does get executed rather than the ON ERROR. Bear in mind VFP 8 so it might be something that was changed (or I misread your explanation).