Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Misleading Message When Form's Shortcut Menu Is Missing


View products that this article applies to.

This article was previously published under Q198966
Moderate: Requires basic macro, coding, and interoperability skills.

↑ Back to the top


Symptoms

When you open a form or right-click on the form to see the shortcut menu, you may receive the following message:
Microsoft Access can't find the macro '<name of shortcut menu>'

↑ Back to the top


Cause

Either the MenuBar or the ShortcutMenu property of the form refers to a menu bar that does not exist in your database. You may also receive this error message if you set the MenuBar property equal to one or more spaces.

↑ Back to the top


Resolution

When you set the MenuBar or the ShortcutMenu property for a form, make sure that the property refers to a valid menu bar.

↑ Back to the top


More information

The error message is confusing because it refers to a macro instead of to the incorrectly set form property. In earlier versions of Microsoft Access, menus were created from special types of macros. This is the cause of the misleading error message.

While current versions of Access still support the use of macros to create menus, you should consider using CommandBars when creating custom menus. You can also convert existing macro-derived menus to command bars as follows:
1.In the Database Window, select the menu macro that you want to convert.
2.On the Tools menu, point to Macro, and click the command that best describes the macro you are converting:
Create Menu from Macro
Create Toolbar from Macro
Create Shortcut Menu from Macro
The macro that you selected will be converted and then appear at the top of the Access window.

Steps to Reproduce Behavior

1.Start Microsoft Access and open the sample database Northwind.mdb.
2.In the Database window, click Forms under Objects.
3.Create a new form not based on any table or query in Design View.
4.Set the MenuBar property of the form to MyShortCutMenu.
5.Open the form in Form view. Note that instead of informing you of a missing command bar, Microsoft Access displays the following message:
"Microsoft Access can't find the macro 'MyShortCutMenu.'

↑ Back to the top


References

For more information about menus and shortcut menus, click Microsoft Access Help on the Help menu, type Work with menu bars and shortcut menus in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

↑ Back to the top


Keywords: KB198966, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 198966
Revision : 2
Created on : 6/28/2004
Published on : 6/28/2004
Exists online : False
Views : 236