Escape Key has special functions (undo current entry then undo current
record) in Forms.
Do you really want to override these special functions?
If you do, set the Form's KeyPreview to True and then use the Form's
KeyPress (or KeyDown?) Event to check for the Escape Key and close the Form
accordingly. You may need to use the Undo Method to undo the current edits
on the Form.