ShortcutMenu Property

Microsoft Access Visual Basic

ShortcutMenu Property

       

You can use the ShortcutMenu property to specify whether a shortcut menu is displayed when you right-click an object on a form. For example, you might want to disable a shortcut menu to prevent the user from changing the form's underlying record source by using one of the filtering commands on the form's shortcut menu. Read/write Boolean.

expression.ShortcutMenu

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

The ShortcutMenu property uses the following settings.

Setting Visual Basic Description
Yes True   (Default) Shortcut menus are displayed.
No False   Shortcut menus aren't displayed.

You can set this property by using the form's property sheet, a macro, or Visual Basic.

This property controls the displaying of the shortcut menus for a form and for any of its controls. If the ShortcutMenu property is set to No, shortcut menus aren't displayed when you right-click a form or any of its controls.

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.

Example

The following example disables the shortcut menus for the Invoice form and its controls:

Forms!Invoice.ShortcutMenu = False