StartupMenuBar Property

Description

You can use the StartupMenuBar property to specify the menu bar macro that creates the global menu bar for your application. For example, you can use the StartupMenuBar property to display a custom menu bar that does not contain the Security menu. This prevents a user from accessing any of the Security menu commands from the menu bar.

Setting

The StartupMenuBar property is a string expression that is the name of a menu bar macro in the current database.

You can set this property by using a macro or Visual Basic. You can also set this property using the Menu Bar option in the Startup dialog box, available by clicking Startup on the Tools menu. This is the easiest way to set this property.

Remarks

If you are setting the StartupMenuBar property, you should not use a SetValue action in the AutoExec macro to set the MenuBar property for the Application object. Since Microsoft Access runs the AutoExec macro after it parses the startup properties, the global menu bar set in the AutoExec macro would replace the menu set by the StartupMenuBar property.

You can also create custom menu bars using the MenuBar property for forms and reports. These custom menu bars are displayed when a specific form or report opens and replace the global menu bar in those cases.

If the StartupMenuBar property is blank, Microsoft Access displays the built-in menu bar. If this property is not blank (default) then the setting of the AllowFullMenus property has no effect.

This property’s setting does not take effect until the next time the application database opens.

Setting this property has the same effect as setting the MenuBar property of Application object (except the MenuBar property setting takes effect immediately).

See Also

AllowBreakIntoCode Property, MenuBar Property, StartupForm Property, StartupShortcutMenuBar Property, StartupShowDBWindow Property, StartupShowStatusBar Property.