I have an MS Access database. The Shift key has previously been disabled but when the user presses F11 , she/he can see the navigation pane . Is there a solution to lock the F11 key to preventing opening the Navigation Pane?
First, the answers here don’t make sense since if you have 100 forms and 100 reports, then you have 200 objects to modify. (this amounts a huge waste of developer time).
Much worse is if a report is displayed, then a form does not have the focus and again you see the nav pane when you hit F11.
Access for 20 years has had the ability to run code and take action for any Fkey or alt key hit to run a macro – and these settings are GLOBAL to the application.
Thus the simple solution is to make an auto keys macro for the application and include F11. This thus will work GLOBAL to the application.
So create a new macro (not a module) called autokeys. The macro will look like this:
You can set function keys in { }
You can also use ^ for control keys (so you can make a global print key) eg: ^P
And you can use + for the shift key, so
+{F11} would be the macro code that runs when you hit shift F11
+^P would be shift+ctrl P
In the above we could have F11 runcode or do anything we want such as launch a form, but as above shows we simply leave the action code inside the F11 block of code blank. So this can be used to have F1 launch a custom access “help” form, or re-map any alt keys that are GLOBAL to the application.
You then simple un-check the show nav pane in the current database start up settings and you are done. Of course as a developer you will hold down the shift key during start to prevent your start up code and forms launching – this also by-passes the auto key macro and ignores all of the settings you “set” in the current database such as hiding the nav pane. So hold down shift key and you can use F11 to show, hide the nav pane and not have your application start up code run so you can work as a developer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With