I have a form that I am working on that has the cancel button the default button if the Escape Key is pressed. This works fine. However when the user presses the Find Button the Click Method makes the buttons invisible and activates the field for the Record Key. If the user enters a value and presses return, no problems. However, I want the user to be able to cancel out of this by pressing the escape key.
I setup a KeyPress method on this field to check for the Escape Key. If it has been pressed it calls THISFORM.control.LostFocus(), which works great except that the default cancel button sees the escape also and exits the form. Before I put in the KeyPress method, the Escape Key was totally ignored.
How to I control what the escape key does or does not do at different times on this form?
Norm
____________________________________________
Norm Peterson
It's a dog eat dog world out there,
and I'm wear'n milk bone underware!