Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-02-11
5
Medium Priority
?
1,866 Views
Last Modified: 2014-02-17
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.

Desired result on the right side.

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.
0
Comment
Question by:11ptMan
5 Comments
 
LVL 40

Expert Comment

by:PatHartman
ID: 39851801
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.
0
 
LVL 75
ID: 39851845
"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
0
 
LVL 49

Accepted Solution

by:
Dale Fye earned 2000 total points
ID: 39851888
funny you ask.  I just published this article on using commandbars and it includes some code examples in the article and the accompanying database for doing just what you ask.

There is also a Part I, located here.
0
 

Author Closing Comment

by:11ptMan
ID: 39865075
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.
0
 
LVL 49

Expert Comment

by:Dale Fye
ID: 39865256
glad i could help.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question