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 / July 2006

Tip: Looking for answers? Try searching our database.

Shortcut key problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vensia - 24 Jul 2006 08:21 GMT
Dear all,

I have a secret shortcut key which opens an entry form. I want the users are
able to change this shortcut key with their own key. If the shortcut key
definition is saved in a table, how do I call it programmatically ?
Thanks.

Vensia
Michel Walsh - 31 Jul 2006 23:37 GMT
Hi,

If the active form has the preview key on, a possible solution is to use a
DLookup or DCount from the KeyDown event of the form:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

   If 0 = DCount("*", "tableName", "Shift=" & Shift & " AND Keycode=" &
KeyCode) Then
       DoCmd.OpenForm ...
   End If

End Sub

Assuming the mentioned table is "local" (in the front end, NOT in the back
end), no need to test for the user id. I assume the table has the two fields
Shift and KeyCode. You could also use database properties, instead of a
local table, since there is likely just one "combination"  to store.

Hoping it may help,
Vanderghast, Access MVP

> Dear all,
>
[quoted text clipped - 5 lines]
>
> Vensia
 
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.