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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

Can I disable items in a custon built shortcut menu?

I create my own shortcut menus.  Can I disable any of the items in the menu.

Thanks in advance.
0
CRB1609
Asked:
CRB1609
  • 3
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Yes ..
(make a backup copy of the db first --- just in case)

Basically ..

CommandBars("YourShortCutItemName").Enabled = False  ' True
CommandBars("YourShortCutItemName").Visible= False      ' True
0
 
CRB1609Author Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Well ... it might be like this:

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

The exact syntax escapes me at the moment ...
0
 
CRB1609Author Commented:
Perfect.  Thank you very much.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You are welcome.
mx
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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now