Hello.
I have a form that were i want to detect when the user presses the ESC key
in order to perform some background operations.
Is there a way to do this?
Thanks.
Luis
Alex Dybenko - 29 Apr 2008 15:57 GMT
Hi,
set form's Key Preview property to True and then look for KeyAscii=27 in
Form_KeyPress event

Signature
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
> Hello.
> I have a form that were i want to detect when the user presses the ESC key
[quoted text clipped - 5 lines]
>
> Luis
Luis - 29 Apr 2008 16:33 GMT
Perfect!
Thanks.
> Hi,
> set form's Key Preview property to True and then look for KeyAscii=27 in
[quoted text clipped - 9 lines]
> >
> > Luis
Rick Brandt - 30 Apr 2008 00:10 GMT
> Hello.
> I have a form that were i want to detect when the user presses the
[quoted text clipped - 5 lines]
>
> Luis
You can add a button and set its Cancel property to Yes. That will cause
its Click event code to run whenever the Escape key is pressed. You can set
the button to transparent if you don't want it to be visible.

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com