Those pesky menubars...

trentham

Registered User.
Local time
Today, 19:07
Joined
Mar 27, 2010
Messages
11
I've been plaing around trying to get my menubars working as I want and although I've managed it, I don't really understand why I was having such difficulty. If someone could point me at a sensible description of it all I'd be very grateful.

What I had was an application (Access2003) with a main menu, 'MyMenu'. When a user had signed on then that was the only menu displayed. When they logged off a different menu, 'MyMenuOff' is displayed.

In order to aid my development, I have a command on 'MyMenu' which toggles the main database menu on and off.

The problems I was having seemed to centre around using the visible/enabled property of commandbars. It seemed that whenever I reenabled a menu, it replaced what was there rather than simply showing the menu as well.

I was using such commands as
CommandBars("menu bar").Enabled = ...
CommandBars("MyMenu").Enabled = ...
etc. and I had a variety of combinations of enabled and visible.

Now, following searching in this forum, I've moved to using such as
DoCmd.ShowToolbar "MyMenu", ...
and it's doing what I wanted.

But why was it not workng the way I wanted using enable?

Obviously I've sorted the problem so it's not urgent, but I have a lack of understanding going on! :confused:
 
I may have spoken too soon in thinking that I'd got it sorted... when I run the applcation in runtime mode, it seems the ShowToolbar command isn't working. I think I REALLY need to understand how this is all working!

:(
 

Users who are viewing this thread

Back
Top Bottom