Hello,
I have customized my own ShortcutMenu in which it has Macros as the Items.
All is working ok.
What I would lke to know is that somtimes I would like certain Items of this
Shortcut Menu to be disabled & other items to have them all enabled.
Can this be done with VBA code to control this ? If so how ?
I saw from the Help menu
DoCmd.SetMenuItem 0, 1, , acMenuGray
which is what I would like to do but it says:
"Note The SetMenuItem method works only with custom menu bars and global
menu bars created by using menu bar macros. "
Can this be used for Shortcut Menus & how ? or other code like this for
Shortcut menus ?
Any help would be greatly appreciated.
Thank you,
Jeff
Albert D. Kallal - 02 May 2005 06:42 GMT
if IsInGroup(CurrentUser,"SuperUser" then
CommandBars("menu bar").Controls("records").
Controls("refresh").Visible = True
end if
if IsInGroup(CurrentUser(),"InvoideDeleteGroup") = true then
CommandBars("myCustomBar").Controls("AdminOptions").
Controls("DleeteInvoice").Visible = True
end if
Note that short cut menus are their own name also:
commandbars("your shortcut name").
Contorls("contorlName").Visible = false
or
commandbars("your shortcut name").
Contorls("contorlName").Enabled = false
additional notes:
You can use "enabled" in place of visible.
The above examples should be on one line...but I wrapped them into two
lines for ease of reading....

Signature
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com
http://www.members.shaw.ca/AlbertKallal