Hide All Toolbars

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I am writing an application which does not need any menu
bar, how do I hide all the menu bars when my application
starts?

I use

DoCmd.ShowToolbar "Menu Bar", acToolbarNo

to hide the menubar but other menu bars still showing.

Thanks

Kevin
 
I have two suggestions for you.
1. Hide all the toolbars with a similar method to the one
you are already trying:
Me.Application.CommandBars.Item("Menu Bar").Visible = False
Me.Application.CommandBars.Item("Web").Visible = False
Me.Application.CommandBars.Item("Toolbox").Visible = False
Me.Application.CommandBars.Item("Database").Visible =
FalseMe.Application.CommandBars.Item("Form View").Visible
= False
Me.Application.CommandBars.Item("Form Design").Visible =
False

2. Create your own custom menu bar with no items(or only a
handfull you decide) and change the settins in Access
(Tools-->Startup...) to display that menubar and remove
the checkbox beside "Allow Built-in Toolbars" which will
remove all the others for you automatically without any
code. Its not documented well but that check box will only
work if you give it a custom menubar to diplay instead.

-Cameron Sutherland
 
Back
Top