469,343 Members | 5,380 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

Hiding Menu Bar

dima69
181 Expert 100+
I use Application.CommandBars("Menu Bar").Enabled=FALSE to hide the standart menu in my application. Sometimes it makes the menu disappear permanently (i.e, the registry settings are changed), and sometimes it does not. It is a problem for users who want to use Access "outside" my application - they cannot see the menu and don't know how to get it back.
I cannot figure out when and why the menu stays hidden.
So if somebody is familiar with this issure I'd appreciate any help.
Mar 5 '07 #1
11 9019
First, don't use that code. To bring back that menu, Goto view menu, toolbars, customize, then check Menu Bar from the list.

Instead of using what you have there, set your Access startup options: Check/Uncheck the bars that you want or don't want to show.

Or you could create your own customer bars. Goto view menu, toolbars, customize, then click on "New" button. After that , you just drag and drop commands to your new bar. You can hide/show your bars with codes or macros.
ShowToolbar:
Toolbar Name = your toolbar name goes here
Show =Yes/No
Name your macro like. mcrShowMyMenu or mcrHideMyMenu

Then on your code, let say in form A Open:
docmd.RunMacro "mcrShowMyMenu"
In Form A Close:
docmd.RunMacro "mcrHideMyMenu

Something along those lines
Mar 5 '07 #2
dima69
181 Expert 100+
Instead of using what you have there, set your Access startup options: Check/Uncheck the bars that you want or don't want to show.
I'me not sure I undestand what you mean by that. I use Access 2000 format, and I don't see how can I check/uncheck the bars from startup options.
Mar 5 '07 #3
On your Access Tools menu, select "Startup", Startup dialog box will appear. Whole bunch of check boxes appear. Here, you can also change application title, icon, display any form on startup.
Mar 5 '07 #4
dima69
181 Expert 100+
On your Access Tools menu, select "Startup", Startup dialog box will appear. Whole bunch of check boxes appear. Here, you can also change application title, icon, display any form on startup.
... but you cannot prevent standart menubar from being displayed, unless you set a custom menubar as Application Menubar. The problem is I don't have a custom menubar in my application, only custom toolbars.
Mar 6 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
... but you cannot prevent standart menubar from being displayed, unless you set a custom menubar as Application Menubar. The problem is I don't have a custom menubar in my application, only custom toolbars.
Once you disable something like this you have to re-enable it. Firstly you will need to control how the application is shut down. The easiest way to do this is to create a form which will open with the database and set it to invisible. Never close this form and it will unload when the database is shut down. In the unload event of the form enable the menubar again.

Expand|Select|Wrap|Line Numbers
  1. Application.CommandBars("Menu Bar").Enabled=TRUE
Mary
Mar 6 '07 #6
dima69
181 Expert 100+
Once you disable something like this you have to re-enable it. Firstly you will need to control how the application is shut down. The easiest way to do this is to create a form which will open with the database and set it to invisible. Never close this form and it will unload when the database is shut down. In the unload event of the form enable the menubar again.

Expand|Select|Wrap|Line Numbers
  1. Application.CommandBars("Menu Bar").Enabled=TRUE
Mary
This is a kind of things I try to avoid. I never use Form_Unload and Form_Close events for something important. User can close an application in a "violent" way, or his computer can crash, or the power get disconnected - the things like that, so the event won't fire.
I believe that making the problem less frequent is not making things any better, in general.
Mar 7 '07 #7
NeoPa
32,183 Expert Mod 16PB
I understand what you're saying, but it doesn't seem a very reasonable position.
If you want to change the way something works in any application (Office App options etc), then surely you must reset the option when you leave the application. What are you envisionning here, some kind of stack to store settings in? I've never come across anything like that anywhere.
Mar 8 '07 #8
Kosal
68
Dear Sir/Madam

I have problem with my Computer because virus affected and hidden Task Manager and Folder Options. I would like to aks Sir/Madam to help me to repiar my computer. How I can ?
Mar 8 '07 #9
NeoPa
32,183 Expert Mod 16PB
Dear Sir/Madam

I have problem with my Computer because virus affected and hidden Task Manager and Folder Options. I would like to aks Sir/Madam to help me to repiar my computer. How I can ?
You need to post a question in the Windows forum.
Please don't expect a help-desk type response, we are here to answer technical questions not as a free support service. Having said that, I'm sure someone there will be able to point you in the right direction at least.
Mar 8 '07 #10
Kosal
68
You need to post a question in the Windows forum.
Please don't expect a help-desk type response, we are here to answer technical questions not as a free support service. Having said that, I'm sure someone there will be able to point you in the right direction at least.
Sorry I confuse na I want to post but i don't know where I can post

thanks you for your inform
Sep 18 '07 #11
MMcCarthy
14,534 Expert Mod 8TB
You will find the Windows Forum here.
Sep 18 '07 #12

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Rob McLennan - ZETLAND | last post: by
1 post views Thread by Peter Pippinger | last post: by
4 posts views Thread by Ian Hinson | last post: by
reply views Thread by Leszek | last post: by
3 posts views Thread by Fred W. | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.