Form.
You can use the ShortcutMenu property to specify whether a shortcut menu is displayed when you click the right mouse button while the pointer is over an object on a form. You might want to disable a shortcut menu to prevent the user from changing the form’s underlying record source.
The ShortcutMenu property uses the following settings.
Setting |
Description |
Visual Basic |
Yes |
(Default) Shortcut menus are displayed. |
True (-1) |
No |
Shortcut menus aren’t displayed. |
False (0) |
You can set this property using the form’s property sheet, a macro, or Visual Basic.
If you’re developing a wizard, you might want to hide shortcut menus on your wizard forms to prevent the user from viewing or using them. This is especially true for forms that display choices. For example, the ShortcutMenu property for the Startup form in the Northwind sample database is set to No. This prevents users from displaying shortcut menus for the form or controls on the form.
AllowFilters Property, ShortcutMenuBar Property, StartupShortcutMenuBar Property.
The following example disables the shortcut menu for the Invoice form.
Forms![Invoice].ShortcutMenu = False