>On a form I have the keypress event look for the Esc key and then release the form - this is fine unless the user was editing a text or edit box - then any chnges to the field are lost.
>
>Can you force a TAB character before the form.release?
>
>thanks in advance.
The default for pressing the Esc key while in a textbox is to revert the value of the textbox to what it was upon entering the textbox.
If you do not like this, you could modify the keypress() of your framework's base textbox class:
IF nKeyCode =27
NODEFAULT
ENDIF
If you do this, you should also probably set the KeyPreview property of your framework's base form class to .T.: this allows the form to handle "ESC" before the control it is pressed on ignores it.