You could use Karen's or Mike's method for clearing the field contents. Then disable the close features on the form properties, uncheck sthe minimize, maximize and close caption buttons, and create your own caption button with an X as the caption, red background, white font...with CLOSEWINDOW in the custom eep. That way, they can still close the window with the X, but they can't use Esc. You can even create your own minimize, maximize buttons too.
-------------- Original message from Lawrence Lustig <[EMAIL PROTECTED]>: --------------
In a given form (in a particular NOTE field) I'd like to trap the ESC key so that it doesn't exit the form but instead clears out whatever the user has typed in the field.
Unfortunately my standard technique of mapping ESC to TAB and then checking LASTKEY() in the field's ON EXIT eep doesn't work as ESC is not mappable. And the new ON KEYPRESS EEP doesn't help because this field is MEMO, not a text edit, and KEYPRESS is not available.
I don't want to use the "turn off all form exit methods" setting on the form property sheet since I still wouldn't get to run my code when the ESC key is hit, and I don't want to turn off the X closing feature.
Does anyone have any suggestions?
--
Larry

