Connecting Tech Pros Worldwide Help | Site Map

Hide Default Menubar

Bill Short
Guest
 
Posts: n/a
#1: Nov 12 '05
Hello World,

I have a form with two custom menubars. One is for when a certain
person logs in and the other is for all other users. To get these to
only come up when they are supposed to I added this line to the OnOpen
Event:
CommandBars("Supervisor Menubar").Visible = False
CommandBars("All Others Menubar").Visible = True

Since I put in this code it brings up the correct menubar but now it
also displays the default "Menu Bar" and I can't seem to get rid of it
through code. If I try adding an additional line like I have listed
above with "Menu Bar" in it I get this error message
"Method 'Visible' of object 'CommandBar' failed".

Thanks in advance,

Bill
Newtown, PA
Jim Allensworth
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Hide Default Menubar


On 21 Nov 2003 06:45:13 -0800, wjs@haroldbeck.com (Bill Short) wrote:
[color=blue]
>Hello World,
>
>I have a form with two custom menubars. One is for when a certain
>person logs in and the other is for all other users. To get these to
>only come up when they are supposed to I added this line to the OnOpen
>Event:
>CommandBars("Supervisor Menubar").Visible = False
>CommandBars("All Others Menubar").Visible = True
>
>Since I put in this code it brings up the correct menubar but now it
>also displays the default "Menu Bar" and I can't seem to get rid of it
>through code. If I try adding an additional line like I have listed
>above with "Menu Bar" in it I get this error message
>"Method 'Visible' of object 'CommandBar' failed".
>[/color]

DoCmd.ShowToolBar "Menu Bar", acToolbarNo


- Jim

Closed Thread


Similar Microsoft Access / VBA bytes