Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Access Function keys 1

Status
Not open for further replies.

ump38

Programmer
Jul 17, 2001
29
US
I'm running Windows NT and using Access 7.0. Database content is highly sensitive and access is tightly secured (password protected, SHIFT key disabled, user can only see information via appropriate forms (which may open reports or queries from selected lists.) Bottom line is that I don't want my user "peeling the onion"..... and some are curious enough to try about anything.

One thing I'd like to be able to remove too is the functionality of the F keys [specifically... the global F-Keys like F1 (help), F7 (spell check), F12 (Save As), etc.]. The F12 concern is mainly that I don't want them to effect the size of the front-end .mdb file.

Is there a controllable way to do this using VBA similar to the way the SHIFT key can be enabled/disabled with:

Code:
db.Properties("AllowByPassKey") = False
(or True)
 
Here u go. I just put all the startup properties in a list below with the one in question bolded.

ChangeProperty "StartupShowDBWindow", dbBoolean, False
ChangeProperty "StartupShowStatusBar", dbBoolean, False
ChangeProperty "AllowBuiltinToolbars", dbBoolean, False
ChangeProperty "AllowFullMenus", dbBoolean, False
ChangeProperty "AllowBreakIntoCode", dbBoolean, False
ChangeProperty "AllowSpecialKeys", dbBoolean, False
ChangeProperty "AllowBypassKey", dbBoolean, False
 
Good stuff....but...

Code:
ChangeProperty "AllowSpecialKeys", dbBoolean, False

appears to disable only these keystrokes (which I'm controlling in the Start-up options dialogue box):

ALT+F1 (F11) Bring the Database window to the front.
CTRL+G Display the Debug window.
CTRL+F11 Toggle between the custom menu bar and the
built-in menu bar.
CTRL+BREAK Enter break mode.

F1, F7, and F12 aren't affected.
 
You could create an AutoKeys macro and remap these keys to something else....soemthing that does nothing or even that gives a mesage that these keys have been disabled. Any key remapped through an AutoKeys macro will override Access' default action for said key. Programming isn't a profession of choice.
It's a profession of calling...
"Hey Programmer, your application broke again!" [spin]

Robert L. Johnson III, A+, Network+, MCP
robert.l.johnson.iii@ssmb.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top