Table of contents
TOC
Collapse the table of content
Expand the table of content

AllowSpecialKeys Property

office 365 dev account|Last Updated: 1/25/2018
|
2 Contributors

Applies to: Access 2013 | Access 2016

You can use the AllowSpecialKeys property to specify whether or not special key sequences (ALT+F1 (F11), CTRL+F11, CTRL+BREAK, and CTRL+G) are disabled or enabled. For example, you can use the AllowSpecialKeys property to prevent a user from displaying the Database window by pressing F11, entering break mode within a Visual Basic module by pressing CTRL+BREAK, or displaying the Immediate window by pressing CTRL+G.

Setting

The AllowSpecialKeys property uses the following settings.

SettingDescription
True (-1)Enable the special key sequences.
False (0)Disable the special key sequences.

The easiest way to set this property is by using the Use Access Special Keys option in the Current Database section of the Access Options dialog box. To view the Access Options dialog box, click the Microsoft Office buttonFile menu button and then click Access Options. In a Microsoft Access database , you can also set this property by using a macro or Visual Basic .

To set the AllowSpecialKeys property by using a macro or Visual Basic, you must first either set the property in the Access Options dialog box once or create the property in the following ways:

  • In a Microsoft Access database, you can add it by using the CreateProperty method and append it to the Properties collection of the Database object.

  • In a Microsoft Access project (.adp), you can add it to the AccessObjectProperties collection of the CurrentProject object by using the Add method.

Remarks

You should make sure the AllowSpecialKeys property is set to True when debugging an application.

The AllowSpecialKeys property affects the following key sequences.

Key sequencesEffect
ALT+F1 (F11)Display the Navigation Pane.
CTRL+GDisplay the Immediate window.
CTRL+F11Toggle between the custom menu bar and the built-in menu bar.
CTRL+BREAKEnter break mode and display the current module in the Code window.

This property's setting doesn't take effect until the next time the application database opens.

ACCESS SUPPORT RESOURCES
Access for developers forum on MSDN
Access help on support.office.com
Access help on answers.microsoft.com
Search for specific Access error codes on Bing
Access forums on UtterAccess
Access wiki on UtterAcess
Access developer and VBA programming help center (FMS)
Access posts on StackOverflow

© 2018 Microsoft