Hide All Toolbars

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
 
C

Cameron Sutherland

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top