ACC: ShortcutMenuBar Property Does Not Work on Image or LabelID: Q166293
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you set the ShortcutMenuBar property of an image control or label
control on a form to the name of a custom shortcut menu, right-clicking the
control causes the default shortcut menu for the form to appear.
The ShortcutMenuBar property does not work with controls that cannot receive the focus.
Use one of the following methods to work around this behavior, depending on your version of Microsoft Access.
Private Sub Image0_MouseDown(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
'If the right mouse button is pressed, show the custom shortcut menu
If Button = acRightButton Then
CommandBars![Custom1].ShowPopup
End If
'Cancel the event so the form's default shortcut menu does not appear
DoCmd.CancelEvent
End Sub
This behavior is by design.
For more information about using shortcut menus in Microsoft Access, search
the Help Index for "shortcut menus," or ask the Microsoft Access 97 Office
Assistant.
For more information about the ShortcutMenuBar property, search the Help
Index for "ShortcutMenuBar property."
Additional query words: short cut popup
Keywords : FmsProp FmsHowto
Version : 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 3, 1999