DoCmd.ShowToolbar

Display or hide a custom toolbar.

Syntax
      DoCmd.ShowToolbar(ToolbarName, Show)

Key
   ToolbarName  The name of a custom toolbar.

   Show         acToolbarNo (2)          Hide the toolbar.
                acToolbarWhereApprop (1) Display the toolbar while
                                         in the appropriate view.
                acToolbarYes (0)         Display the toolbar. 

A form or report menu bar will take precedence over a global menu bar (Application.MenuBar.)

If you replace the built-in menu bar with a custom one, Access will hide the built-in menu bar.
Pressing Ctrl + F11 will toggle the display of the built-in menu bar.

The startup option "Allow Built-in Toolbars" will affect the availability of Built-in toolbars/Ribbon

Example

DoCmd.ShowToolbar "Ribbon", acToolbarNo

“Much of my work has come from being lazy. I didn't like writing programs” ~ John Backus (Think - IBM employee magazine)

Related:

Echo - Turn screen updating on or off.


© Copyright SS64.com 1999-2013
Some rights reserved