Set lReleaseOnEsc property to .F. for your base form class. In MereMortals pressing ESC is equavalent to Close if this property is set to true, which, I believe, its default state.
>I'm new to MereMortals and having a problem with the escape key in a form.
>
>The problem comes up when I've entered some data into a form, and then hit the escape key. The program code is attempting to do a SQLPassthrough, and I get error 52 (No table is open in the current work area) in Line 38. The displayed method is ISEMPTY and the object is cSqlPassThrough1 in the data environment for the form. I've traced through and found that the actual error is the code in the cCursor class in MM cDataEnv (at the 4th line).
>
>Has anyone had this problem? If so, is there a way to basically SET ESCAPE OFF in the code? I've tried this in different places but to no avail.
>
>Your help is greatly appreciated.
If it's not broken, fix it until it is.
My Blog