Get Rid of Multiple Menu Bars on a Form

A

Altemir

I have a database where I have created two custom menu bars, MyMenuBar1
and MyMenuBar2. I specified "Me.MenuBar = "MyMenuBar" in the open
event of a form but it shows BOTH custom menu bars instead of just the
one I wanted.

Why is it doing this and how can I make it show only the menu I want
for that particular form?
 
A

Albert D. Kallal

The trick is to make sure that you use shift-enter when you load the
database...

Now, hide (un check) any extra menu bar that is showing...

You don't need any code to do this....

You most certainly can, and should hide all of the ms-access interface. The
options to complete hide and keep people out of the ms-access interface can
easily be done using the tools->start-up options. Using those options allows
you to complete hide the ms-access interface (tool bars, database window
etc). Also, using these options means you
do not have to bother setting up security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass. I have a sample mdb file
that will let you "set" the shift key bypass on any application you want.
You can get this at:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

In that sample, notice how when you load a different form, the menu options
change...(try each option),..and then load another form...see how it
changes!!...no code was needed to make those menus change.

You *REALLY* want to use the forms setting to manage the menus, since what
happens when you have 2, or 5 forms open...and a user switches to another
form...you can possibility being to try and code this type of scenario...so,
you want a design that works off of the menu bar setting (the one in the
"other" tab of the forms property sheet). You can't start coding the display
of menus, since switching forms means that you now have to try and figure
out how to hide those menus....really, next to impossible when you have many
forms open, as then you have to try and write code to hide menus!
 

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