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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Customized Menu Bars

Status
Not open for further replies.

rickj65

Programmer
Jun 5, 2002
79
US
I have an Access 2000 application utilizing customized menu and toolbars.

I have a Main Switchboard form with its own customized menu bar. When I open another form via the Main Switchboard, that form's customized menu bar appears; however, the Main Switchboard benu bar remains open as well. I have 2 menu bars showing when I only want the menu bar for the form that is currently active. I would've thought the menu bar would've changed dynamically so that only one menu is showing at a time.

I know I can get rid of the Main Switchboard Menu Bar by closing that form; however, I want the Main Switchboard to always remain open, even if it doesn't have the focus.

I also know I can implement the DoCmd.ShowToolbars command in VBA; however, doing this for every form I open and close over the Main Switchboard seems toilsome and prone to error. There must be a simpler solution that I'm missing.

Any suggestions?

Thanks,

Rick





 
Potential solution:

Create one table with two fields, Form name and menu bar name.

Create a function that:
a) Checks for the active form.
b) Does a Dlookup of the Menubar name, based on the active form name
c) hides all menubars
d) shows the menubar from the dlookup

All you need to do if call this function from the On_Activate event of your forms.

------------------------
Hit any User to continue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top