Solved

Can I disable items in a custon built shortcut menu?

Posted on 2014-11-04
5
125 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 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

15 Experts available now in Live!

Get 1:1 Help Now