DoCmd Object.
The ShowToolbar method carries out the ShowToolbar action in Visual Basic. For more information on how the action and its arguments work, see the action topic.
DoCmd.ShowToolbar toolbarname [, show]
The ShowToolbar method uses the following arguments.
Argument |
Description |
toolbarname |
A string expression that is the valid name of a Microsoft Access built-in toolbar or a custom toolbar you’ve created. If you execute Visual Basic code containing the ShowToolbar method in a library database, Microsoft Access looks for the toolbar with this name first in the library database, then in the current database. |
show |
One of the following intrinsic constants: acToolbarYes If you leave this argument blank, the default (acToolbarYes) is assumed. |
If you leave the show argument blank, don’t use a comma following the toolbarname argument.
AllowBuiltInToolbars Property; DoCmd Object; GetOption, SetOption Methods; ShowToolbar Action.
This example displays the custom toolbar named CustomToolbar in all Microsoft Access windows that become active.
DoCmd.ShowToolbar "CustomToolbar", acToolbarYes