Hiding/Displaying items on a Menu

G

Guest

I have created a custom menubar and have added about 7 menus to the bar. Under each menu I have several commands. The file menu that I have created looses the Print command and Page Setup command when I unselect the "Allow Full Menus" option in the Startup settings of my Access app. I have used the following commands in Access 97 to do the hiding and displaying of menu items but in Access 2003 it will not work. Any ideas on how to accomplish this?

CommandBars("Our-HR").Enabled = True
CommandBars("Our-HR").Controls("File").CommandBar.Controls("&Print ...").Visible = True
CommandBars("Our-HR").Controls("File").CommandBar.Controls("&Print ...").Enabled = True
CommandBars("Our-HR").Controls("File").CommandBar.Controls("Page Set&up...").Visible = True
CommandBars("Our-HR").Controls("File").CommandBar.Controls("Page Set&up...").Enabled = True
CommandBars("Our-HR").Controls("File").CommandBar.Controls("S&end...").Visible = True
CommandBars("Our-HR").Controls("File").CommandBar.Controls("S&end...").Enabled = True
 
G

Guest

Just figured it out!!!! I dragged a couple of commands from one of the Access menus to my own menu and changed properties for it. Doing it that was won't let you use the code I used below in the past. I created all my menu items from scratch now and used the code below just fine. It works only if you manually create the menu items - don't try the easy way out and copy from an Access menu to your own. It will bite you in the end!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top