ACC2002 - MenuBar property not working

T

Tony_VBACoder

In my Access 2002 database, I have a Form where I want the
MenuBar to be Nothing - I do not want the default Access
Menu bar from appearing. In my Startup options, I have
unchecked everything, because I am using custom
commandbars for all my Forms. In the Help for the MenuBar
property of my Form, the following appears:
-------------------
Enter the name of the menu bar you want to display. If you
leave the MenuBar property setting blank, Microsoft Access
displays the built-in (default) menu bar or the
application's global menu bar. If you set the MenuBar
property to a value that is not the name of an existing
menu bar or menu bar macro, the form or report will not
have a menu bar (the default menu bar will not be shown).
--------------------

The section that I can't seem to get to work is "If you
set the MenuBar property to a value that is not the name
of an existing menu bar or menu bar macro, the form or
report will not have a menu bar (the default menu bar will
not be shown).". I tried to set my MenuBar property to a
MenuBar that does not exist in my application, for
instance, "ThisDoesNotExist", but I get the following
error when I try to load my form:

"MyApp can't find the macro 'ThisDoesNotExist.' The macro
(or its macro group) doesn't exist, or the macro is new
but hasn't been saved. Note that when..."

I am basically trying to have a simple form have no
menubars (ie: a Change Password Form).

How can I get this work?
 
A

Albert D. Kallal

That help text does hint that things will not work, but the way it worded,
it does seem to imply that things not working might be a benefit!

I think that advice is just plain wrong.

I would suggest that you just make a little menu bar with nothing on it, or
perhaps your help system can be available.

You could also just make a fake menu bar with the same options, but not
enabled..and thus when you launch your cute little form, all of the menu
options would go grey..it would be a nice touch, no code, and look quite
good.

But, I will say that the help text is misleading on this one...
 
T

Tony_VBACoder

Albert, that is a good suggestion, except for a couple of
things.

1) If I create a new Toolbar with NO buttons, there
appears to be a drop down arrow that allows the user the
ability to "Add or Remove Buttons" at the far right corner
of my toolbar. With no buttons and this drop down arrow,
my Toolbar looks "unprofessional". I do not want this to
happen because I have found no solution to how to remove
this drop down arrow button from appearing. If anyone has
found a way to prevent this from appearing, please post
the solution here.

2) I must also create an empty MenuBar. I cannot have one
without the other, otherwise, whichever I don't use,
Access will default to the "Default Menu". This empty
MenuBar works good (makes it appear as no MenuBar),
however, the Toolbar is still a problem (see #1 above).
 
A

Albert D. Kallal

Hum, the only ansewr I have to offer here is to not create the toolbar.

So, just have a menu bar...and no tool bar.

I use lots of menu bars..but tools bars I don't use very much (so, I have
not had your probem).

I suppose you could try some code to hide the main tool bar that is still
showing?

(so, perhaps in the on-load event, you hide the tool bar..and in the
on-closse event of this dialog form..you show it).
 
D

david epsom dot com dot au

1) customise the menu bar properties: turn off
'allow customising'

2) use DoCmd.ShowToolbar to turn on and off individual
toolbars under program control.
 
D

Dirk Goldgar

Tony_VBACoder said:
In my Access 2002 database, I have a Form where I want the
MenuBar to be Nothing - I do not want the default Access
Menu bar from appearing. In my Startup options, I have
unchecked everything, because I am using custom
commandbars for all my Forms. In the Help for the MenuBar
property of my Form, the following appears:
-------------------
Enter the name of the menu bar you want to display. If you
leave the MenuBar property setting blank, Microsoft Access
displays the built-in (default) menu bar or the
application's global menu bar. If you set the MenuBar
property to a value that is not the name of an existing
menu bar or menu bar macro, the form or report will not
have a menu bar (the default menu bar will not be shown).
--------------------

The section that I can't seem to get to work is "If you
set the MenuBar property to a value that is not the name
of an existing menu bar or menu bar macro, the form or
report will not have a menu bar (the default menu bar will
not be shown).". I tried to set my MenuBar property to a
MenuBar that does not exist in my application, for
instance, "ThisDoesNotExist", but I get the following
error when I try to load my form:

"MyApp can't find the macro 'ThisDoesNotExist.' The macro
(or its macro group) doesn't exist, or the macro is new
but hasn't been saved. Note that when..."

I am basically trying to have a simple form have no
menubars (ie: a Change Password Form).

How can I get this work?

Try setting the form's MenuBar property to

=1

Unfortunately, that doesn't seem to work for the Toolbar property.
 
T

Tony_VBACoder

Thank You:

"=1" worked great for the MenuBar, now if only we can find
a way to get the Toolbar to not show.
 
T

Tony_VBACoder

Thank You

Along with Dirk's suggestion of "=1" for the MenuBar
property in another post in this thread, and your great
suggestion of the "DoCmd.ShowToolbar", this is a great
start.

I wonder if this will ever be a future fix in an Office
Patch, where if we followed what the Access Help file says
to do (see my original post), it would work as designed.
 
A

Albert D. Kallal

Tony_VBACoder said:
I wonder if this will ever be a future fix in an Office
Patch, where if we followed what the Access Help file says
to do (see my original post), it would work as designed.

I will write this up..and send it to the help folks....
 

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