[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • 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
 
CRB1609Business OwnerAuthor 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
 
CRB1609Business OwnerAuthor Commented:
Perfect.  Thank you very much.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You are welcome.
mx
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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