Hiding menu bar on mde startup

S

Silvester

Hi,

I have my own custom menu bars that I use with my app.

I am trying to hide the default menu bar when my mde starts up by running
the code
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
from a module function called by the autoexec macro on mde startup.

For some annoying reason this does not work, leaving the menu bar onscreen
for end users to meddle with. My custom menu bar appears below the default
menu bar.

Please let me know what I am doing wrong and how to ensure the menu bar is
hidden as soon as the app starts up.

TIA
 
T

tina

try clicking Tools, Startup on the menu bar, then uncheck the Allow Full
Menus checkbox, and select your custom menu from the Menu Bar droplist.

hth
 
G

Guest

by doing what Tina suggested, you can still press ctrl F11 to toggle between the two menus.
 
T

tina

true enough. to prevent that, you can uncheck the Use Access Special Keys
checkbox - also in Tools, Startup.
of course that only works as long as your users don't know enough to hold
down the Shift key to bypass the Startup settings. to prevent that, you have
to set the AllowBypass property to False - being careful not to change it
permanently!


Alex said:
by doing what Tina suggested, you can still press ctrl F11 to toggle
between the two menus.
 
A

Albert D. Kallal

Silvester said:
Thanks. A vba coding solution would be preferred

Why use VBA?

Try downloading the 3rd example at:

http://www.attcanada.net/~kallal.msn/msaccess/DownLoad.htm

It complete hides the ms-access interface, and no code at all is needed.

Give the above a try. Of course, for production I would distribute a mde,
and turn off the shift key by-pass...but other then that...no code at all is
needed...

You can use my shift-key utility at:

http://www.attcanada.net/~kallal.msn/msaccess/msaccess.html
 
S

Silvester

Thank you. From what I can see, you have chosen your custom menu bar on app
startup options.

Hopefully this should do the trick
 
D

dandgard

try this, you have to have the Office reference library for commandba
and commandbarcontrol.

Public Function CloseMnuItems() As Variant
Dim cbMenu As CommandBar
Dim cbC As CommandBarControl

Set cbMenu = CommandBars("Menu Bar")
cbMenu.Enabled = False

End Functio
 

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

Similar Threads

Menu Bar hidden 1
Run-time error 3
Custom Menu Bars 5
Access 2007 - Hiding the Menu Bar 2
2 custom menu bars, depending on permissions? 4
Ribbon and Menu Bar 2
Menu bar remains hidden 2
Hide Menu Bar 1

Top