Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can I disable items in a custon built shortcut menu?

Posted on 2014-11-04
5
Medium Priority
?
141 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 - Microsoft MVP, Access and Data Platform) earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

661 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