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 / Forms Programming / January 2007

Tip: Looking for answers? Try searching our database.

How do you create shortcut keys in code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cameron - 30 Jan 2007 18:48 GMT
I am trying to automate the process of having a data entry clerk enter data
into a form and to have her just enter shortcut keys to do tasks like close
the form or to open specifc tabs.

How would I code this into the page so that she could just do simple key
presses to move around the forms?
Perry - 30 Jan 2007 19:33 GMT
No need for programming.

Indicate in the Caption property of the controls, which lettre you want
the shortcut key to react on by inserting "&" sign

Exmple
me.Command1.Caption = "O&K"
will have K as the shortcut key

or

me.Command1.Caption = "&OK"
will have O as the shortcut key

Krgrds,
Perry

>I am trying to automate the process of having a data entry clerk enter data
> into a form and to have her just enter shortcut keys to do tasks like
[quoted text clipped - 3 lines]
> How would I code this into the page so that she could just do simple key
> presses to move around the forms?
Perry - 30 Jan 2007 19:38 GMT
Below exmpls smell like coding despite my
intial remark: no coding ..stuff

You can enter the settings in the properties pane.
;-)

Krgrds,
Perry

> No need for programming.
>
[quoted text clipped - 21 lines]
>> How would I code this into the page so that she could just do simple key
>> presses to move around the forms?
Cameron - 30 Jan 2007 19:42 GMT
Yup, I got that part. But then in the code on the form how do you get the
button to reconize that it has been pressed via the shortcut keys?

Don't you need to enable keydown and then have the code check to see what
was pressed?

I just do not remember how to code this.

> No need for programming.
>
[quoted text clipped - 20 lines]
> > How would I code this into the page so that she could just do simple key
> > presses to move around the forms?
Perry - 30 Jan 2007 19:56 GMT
You need to recognise the keydown event of controls?
Eventhough I don't like to work with this one, but you can certainly use:
Activecontrol under the Screen object as in:

MsgBox screen.activecontrol.name

Krgrds,
Perry

> Yup, I got that part. But then in the code on the form how do you get the
> button to reconize that it has been pressed via the shortcut keys?
[quoted text clipped - 30 lines]
>> > key
>> > presses to move around the forms?
Cameron - 30 Jan 2007 20:06 GMT
I tried using the & to underline the respective letter that the user would
click as a shortcut key but when the application was deployed it didn't work.
So I figured it was like working in VB where you physicially had to assign
the shortcut key to a menu item before it would run. But I have seen it
before where you can assign mouse and key combination to active certain
functions on a form.

> You need to recognise the keydown event of controls?
> Eventhough I don't like to work with this one, but you can certainly use:
[quoted text clipped - 39 lines]
> >> > key
> >> > presses to move around the forms?
Perry - 30 Jan 2007 22:17 GMT
Try to hit ALT twice and see whether the underlinement (shortkey assignment)
kicks in.

Krgrds,
Perry

>I tried using the & to underline the respective letter that the user would
> click as a shortcut key but when the application was deployed it didn't
[quoted text clipped - 52 lines]
>> >> > key
>> >> > presses to move around the forms?
John G - 31 Jan 2007 05:57 GMT
Use TAB key to move from field to field in the form. The fields and/or
command buttons that you have assigned shortcut keys, must have the focus for
the shortcut key to work.

Hope this helps.

John

> I am trying to automate the process of having a data entry clerk enter data
> into a form and to have her just enter shortcut keys to do tasks like close
> the form or to open specifc tabs.
>
> How would I code this into the page so that she could just do simple key
> presses to move around the forms?
 
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.