>>I don't believe that the valid event will fire by pressing the escape key. If Tan wants to release the form then I would put code in the keypress event of the validated textbox.
>>
>>If nKeyCode=27
>> thisform.release
>>endif
>>
>
>In VFP 5.0a (and I believe in other versions) the valid event does fire whenever the cursor is in the field. If you wish to leave a form without the valid() code running when you press Escape you will have to bypass the valid() code somehow.
This isn't much of a compatibility, eh? In all the previous versions of Fox(Pro), Escape key was a legitimate way to exit from a Read without firing anything at all. Now we have to code around it.