472,790 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,790 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 9635
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,534 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,534 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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.