Steve:
So, I should override the error at the FORM level, rather than down in the object performing the action that caused the error? Is that how error handling in VFP usually works - from the top down? If so, that was the gap in my understanding...
TIA
Michael
>Michael,
>
>Add two properties to the form, called lErrorOccurred and lSuppressError. In the error() method of the form, you can do as you suggested and trap the specific error.
>
>The following code bypasses the error routine in Codemine. Hopefully something like this will work in your situation.
>
>
>* formMethod1() method
>thisform.lErrorOccurred = .f.
>thisform.lSuppressError = .t.
>x = "a" + 5
>thisform.lSuppressError = .f.
>
>if thisform.lErrorOccurred
> activate screen
> ? program(),"Houston, we have a problem!"
>endif
>* end of method
>
>* form.error() method
>LPARAMETERS nerror,cmethod,nline
>
>if !this.lSuppressError
> return dodefault(nerror,cmethod,nline)
>else
> * trap for specific error here, and call dodefault() if necessary
> thisform.lErrorOccurred = .t.
>endif
>
>
>
>>The code is within a method of an object on the form - and yes, I'm doing it for someone else who has CodeMine.
>>
>>>Michael,
>>>
>>>Where is this code? Is it in a form method or within a method of an object on a form?
>>>
>>>Are you trying to solve this for someone else who has Codemine?
>>>
>>>I am running Codemine, and I'm willing to help out...
>>>
Kogo Michael Hogan
"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?
Ideate Web Site