Solved

Can I disable items in a custon built shortcut menu?

Posted on 2014-11-04
5
128 Views
Last Modified: 2014-11-09
I create my own shortcut menus.  Can I disable any of the items in the menu.

Thanks in advance.
0
Comment
Question by:CRB1609
  • 3
  • 2
5 Comments
 
LVL 75
ID: 40423117
Yes ..
(make a backup copy of the db first --- just in case)

Basically ..

CommandBars("YourShortCutItemName").Enabled = False  ' True
CommandBars("YourShortCutItemName").Visible= False      ' True
0
 

Author Comment

by:CRB1609
ID: 40425374
I think it needs more.

I'm trying to do this in the On Enter event of the subform, where I can determine if I want to disable an item or not.  As a result I get a run time error 5 'An Invalid procedure call or argument'.

Wouldn't I have to identify the Shortcut menu, first?  Or something?
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 40425573
Well ... it might be like this:

CommandBars("SomeMenuName").Controls("YourShortCutItemName").Visible= False

The exact syntax escapes me at the moment ...
0
 

Author Closing Comment

by:CRB1609
ID: 40431917
Perfect.  Thank you very much.
0
 
LVL 75
ID: 40431986
You are welcome.
mx
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

929 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now