trapping keystrokes

  • Thread starter Thread starter Ann B
  • Start date Start date
A

Ann B

Hi,
Is there a way to trap all global shortcut keys in Access so they are
disabled as soon as the database opens. I've been reading about the key
preview property but that would mean you have to put code in every form. Is
there a simpler method.
Thanks.
Ann
 
Open your database. On the menu bar, select Tools,
Startup. Click on the 'Advanced' button, and uncheck the
box labeled 'Use Access Special Keys'. Hopefully that
accomplishes what you've described. Good luck.
 
Hi Ann

Which shortcut keys do you want to disable? Most of them will be looked
after if you disable the "Use Access Special Keys" option in Tools>Startup.

If any others need to be disabled, then you could use an AutoKeys macro, and
assign each key to run a dummy function. Search for AutoKeys in the online
help.
 
If by "global shortcut keys," you meant F11 to show the database window, etc., then the previous post is nearly correct. However, changnig the startup options as suggested does not prevent a user from bypassing the startup options and any AutoExec macro by using the shift key. Check out some of the links at mvps.org if you want to disable this option, but be careful

If instead you meant F1 for help, and that sort of thing, then the only way I know of is to work the keydown event of every form. Happily, you can write the handler once in a module and call it with the same line of code from every form (and report)

Hope this helps

- Scott
 
Thanks to all for such a prompt reply however the option under "Tools,
Startup doesn't help. I unchecked all the
boxes but many of the keys are not trapped. Some of them are global windows
keys.

The most pesky key is ALT F4. It closes Access immediately. I found that I
can't use the ALT (%) symbol in AutoKeys. How do I disable this keystroke.

I'll also check out the links at mvps.org

Thanks for any help.
Ann
 
Back
Top