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!
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!