473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 9711
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,556 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,556 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

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

Similar topics

8
by: Rob McLennan - ZETLAND | last post by:
Hi, I have set up an external stylesheet, named "print.css", to format the style of all pages printed from my company's website. I've been previewing my changes to the stylesheet by doing...
9
by: cmac | last post by:
Greetings, I love the HV menu and have been uning it for a long time. I recently was asked how to make a page for my wife (wedding coming up soon) and my wife would like to have 2 ways to...
1
by: Peter Pippinger | last post by:
Hello NG, Is it possible, to hide the menubars of a browser, if the window is already opened? I want to post a html-form to a "_blank" target (new window). This new window should have no...
4
by: Ian Hinson | last post by:
The pop-up (drop-down?) menu items that appear in both built-in and custom menubars since Office 2000 now sometimes appear "sunken" and by default are not visible, unless the chevron is clicked at...
7
by: Danielb | last post by:
I want my application to run most of the time as just an notify icon visible in the system tray, with some dialogs windows that open if the user selects an option from the context menu on the tray...
0
by: Leszek | last post by:
Hello! I'm looking for any examples of "How create hiding menu" like an msdn.microsoft.com/library I'm using VS2005 (Framework 2.0). Leszek
3
by: Fred W. | last post by:
(using VS2005) I want to hide a menu item, but setting the Visible property to False does not work! If it's initialy false and I set it to true, that works. Any suggestions? - Fred
0
nicebasic
by: nicebasic | last post by:
I'm trying to find a way to hide Start Menu (NOT Start Button) in Windows XP through VB 6.0 Code. I know how to do the following: 1. Hiding the Taskbar 2. Hiding the Start Button 3. Renaming...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.