While testing my application, I found a number of users were inadvertently using the various command and menu bars. To alleviate this, EE gave me a great routine I run at startup which disables all of bars -
Dim i As Integer
For i = 1 To CommandBars.Count
Application.CommandBars(i).Enabled = False
Next i
After this runs, I also have code for a custom Menu Bar I created which gives users everything they need.
CommandBars("Custom Menu Bar").Enabled = True
CommandBars("Custom Menu Bar").Visible = True
This works great for users - but I very much need the shortcut menu bar (right click of the mouse)! What is this shortcut bar called and how can I add this to my VBA?
Microsoft Access
Last Comment
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
8/22/2022 - Mon
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Not sure it that article mentions it, but ... when you are in the Customize mode (dialog) ... if you hold down the Control key, you can drop and drag (ie, copy) menu items from one place to another ... handy for making a new menu that is similar another one.
mx
rockiroads
the property of the form called
"Shortcut Menu"
if that is set to No then u cannot use right click
and if set to Yes then u can
so set that property to yes then set your menu bar in the form
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Also:
From the menu:
View>>Toolbars>Customize
On the Toolbars tab, check off 'Shortcut Menus
A menu bar will appear in the upper right ... showing all custom right click menus.
Well, I can definitely say I don't want to go down this path again!
The code I wrote at the beginning of the thread turns off EVERY POSSIBLE "bar" - menu bars, tool bars, custom bars, "hidden" bars, shortcut bars, you name it.
So after the reversal of the code (thanks dmx) - and the subsequent explosion of bars on my screen - I went thru and detailed which were tool bars (View -> Tool Bars -> Customize). If you were wondering, Access has 33 tool bars - I will post the list in a second.
The ONE bar that was never visible - the ONLY ONE I was looking for - was the SHORTCUT MENUS TOOL BAR.
The only way I found to get to it back was thru Tools -> Startup and check "Allow Default Shortcut Menus".
So thanks everyone for the suggestions - and I will never touch another tool bar again.
http://www.jamiessoftware.tk/articles/menubars.html
Not sure it that article mentions it, but ... when you are in the Customize mode (dialog) ... if you hold down the Control key, you can drop and drag (ie, copy) menu items from one place to another ... handy for making a new menu that is similar another one.
mx