Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MenuBar 3

Status
Not open for further replies.

pbrown2

Technical User
Jun 23, 2003
322
0
0
US
Is there away to "Hide" or make the MenuBar inoperable?
I have tried:

MenuBar.Visible = False

But get "Invaild Qualifier" and goes directly to MenuBar

I have done something like this before, but can not remember how... It is not like a toolbar where I can customize, but rather hide the menu bar

Thank you for any and all help,

PBrown
 
I believe this is what you are looking for -

DoCmd.ShowToolbar "MenuBar", acToolbarNo


Good Luck,


Steve
 
I first tried:
DoCmd.ShowToolbar "MenuBar", acToolbarNo
but the error "Can not find toolbar "MenuBar""

Next I tried to uncheck everything in the startup area, however the items that I need not to appear still do.
Such as:
File Edit Insert Records.....

Along with the _ [] and X in the top right corner. I am attempting to make it so that the only way a user can exit Access is via the "Quit" button that I have created. This way there is no loose of records, data or errors if they attempt to exit in the middle of an entry.

Any suggestions?

Thank you for any and all help,

PBrown
 
PBrown, Try This:

This is something I've tried before and it seems to work.

First Customize a new menu bar by right clicking in the menu/toolbar area to "Customize".

Then create a new menu bar with no items in it - don't add any menu items or toolbars(also don't forget to change the "type" to menu bar).

On your form properties call up this new menu bar.

You must at the startup screen uncheck everything as josh has described. Let me know if this works for you.


Dan
 
Hi

try this:
to hide all the menu bar :
CommandBars("menu bar").Enabled = False

CUOK
 
Menu bar now replaced with a custom menu.

Now for the last part, is there away to disable the _ [] and X at the top of Access. So that the user must use the EXIT button on the form to exit access?

Thank you for any and all help,

PBrown
 
Hi!

If you do a search on the access forums, you'll find a lot of threads discussing how to remove those buttons (one is for instance thread705-745523). But the challenge still remains - how to prevent users from closing the database without going thru your validations/before close routines (see - removing those buttons won't stop the user from closing the last form/database with CTRL+F4, CTRL+W, ALT+F4).

So I'm not addressing the visual element of removing those buttons, but how to control the closing of the database:
My favorite approach is described in faq702-1870. I believe this is perhaps the only way of ensuring that the database closes with the degree of control needed.

HTH Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top