Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling Access Menus

Status
Not open for further replies.

KnowledgeSeeker

Programmer
Feb 19, 2002
5
US
This is probably a very easy question but I have been struggling with finding an easy answer in the documentation. I have built a customized menu (Access 2000) and would like to programmatically disable/enable and make visible/invisible different options on the menu. The menu is the menubar specified for the form. What would be the correct syntax for doing that? I am thinking that it should be something like me.menubar[??????]. Thanks for your help!
 
Whew! Not sure if you can actually do this per se, on a "menu" (such as they are) - I'd think the menu choices would take care of themselves were they in context or not.

If this is a real heartbreaker for you, you could probably "fake out" a menu using a borderless form with small command buttons on it - those are a lot easier to hide/unhide or disguise.

If you can give us some examples of what your menu choices do, maybe there's a better answer??? "Remember, you're unique - just like everyone else"
You're invited to visit another free Access forum:
or my site,
 
Sorry, I may have mis-stated the question (so many terms and I can't seem to use the right one!). What I want to do is disable and enable, or hide and make visible, menu *bar* options - similar to the way Microsoft applications do it. As an example, perhaps on one Access form, the File-Edit option would be enabled, on another form, the File-Edit would be greyed out. Or perhaps an Insert option would be appropriate on one form, but inappropriate and therefore invisible on another. Sorry about the confusion! It looked right until I read it in context to your response, Jim.
 
You need to get a copy of Access 2000 Developer's Handbook Volume 1: Desktop Edition by Ken Getz, Paul Litwin and Mike Gilbert. It is an outstanding book. Pages 833-882 covers working with the CommandBars object which is what you need for the menus and toolbars. It is a bit complicated but doable.

RK
UBN Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top