Link to home
Start Free TrialLog in
Avatar of 11ptMan
11ptMan

asked on

Is it possible to modify the right click menu in Access 2010?

How can I modify the right click menu in Access 2010?

In my application I've hidden the menu, ribbon  and navigation window using the following code

    DoCmd.NavigateTo "acNavigationCategoryObjectType"
    DoCmd.RunCommand acCmdWindowHide
    DoCmd.ShowToolbar "Ribbon", acToolbarNo

and know that I could disable the entire right click menu by unchecking the "allow default shortcut menu" option.

But,  in some circumstances  I would like to allow the user to access several of the options on the short menu but not all of them.

User generated image

For example when a report has been displayed in print preview if would be nice if they could right click and choose Print rather having to return to the form and click the print button.  Also the Print option on the short menu provides the print dialog allowing them to choose a printer other than the default.

I'm not set on removing them as illustrated if they can be disabled that works just as well.
Avatar of PatHartman
PatHartman
Flag of United States of America image

If you compile the app to an .accde (don't forget to save the .accdr) and then rename it to .accdr you can force Access to pretend to be the runtime engine.  Once you do that, you either won't get the right-click menu at all or you'll get only the non-design options.
"How can I modify the right click menu in Access 2010? "
The only way to modify any right click menu in >=A2007 is via VBA code. I don't recommend modifying the built in menus. If you have any custom right click menus from <=A2003 - you will need to use VBA code to add new ones or edit existing ones.

mx
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 11ptMan
11ptMan

ASKER

I apologize  for the delay in responding,  Your article provided exactly what I needed to accomplish the task. And as an added bonus I learned a great deal about the structure and use of both menus and tool bars.
glad i could help.