ACC97: Unable to Disable Custom Menu by Using SetMenuItem Action (189902)
The information in this article applies to:
This article was previously published under Q189902 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you run a macro that uses the SetMenuItem to disable a custom
menu option, the action fails.
RESOLUTION
To work around this behavior, you can use the SetMenuItem method from
within a Visual Basic for Application procedure, as illustrated by the
following line of code:
DoCmd.SetMenuItem 0,1,,acMenuGray
-or-
You can use the properties and methods of the CommandBars collection to
manipulate and customize both built-in and custom menus.
For additional information about using Visual Basic for Applications to
modify command bars, please see the following article in the Microsoft
Knowledge Base:
160293 ACC97: How to Dim Menu Items or Disable Toolbar Buttons
in code
REFERENCES
For additional information about command bars, search for "CommandBars
collection" using the Microsoft Access Help menu.
Modification Type: | Major | Last Reviewed: | 9/25/2003 |
---|
Keywords: | kbprb KB189902 |
---|
|