Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / April 2008

Tip: Looking for answers? Try searching our database.

Detect ESC key pressed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luis - 29 Apr 2008 15:40 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.