ESC key to close form not working

E

Emilio

Hi,
I am a newbie with a simple problem.
I used to be able to close forms pressing ESC key.
Now for some reasonm one of my most used forms doesn't do
it anymore.
Recently I made changes to the query in one of its
subforms, nothing major.
Can someone remind me how to get a form to close with ESC
key. (I thought it had something to do with Popup or
Modal properties but can't make it work)

Thanks for any help,
DEmilio
 
M

Michel Walsh

Hi,


A button has a property "Cancel", setting it to True means "If someone use
the Esc key, while for form owns the keyboard, generates the onClick event
for that button". The property "Default" does the same about the Enter key.

So, make a button that will close the form, set its property Cancel to True
(or Yes, if from the form designer).



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top