Microsoft KB Archive/198966

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

Article ID: 198966

Article Last Modified on 6/28/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q198966



Moderate: Requires basic macro, coding, and interoperability skills.



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 ' '



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.



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



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:
 * 3) * Create Menu from Macro


 * 1) * Create Toolbar from Macro


 * 1) * 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
 Start Microsoft Access and open the sample database Northwind.mdb. In the Database window, click Forms under Objects. Create a new form not based on any table or query in Design View. Set the MenuBar property of the form to MyShortCutMenu. 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.'

</li></ol>

<div class="references_section">