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

Toolbars/Menu's problems

Status
Not open for further replies.

AmigoMobility

Technical User
May 8, 2005
57
US
I found the code below to turn off the toolbars and menu's, which works fine, however even if I set it back to true at the Close event of the main form, I can not see the toolbars and menu's on any of my other databases (separate dbases from the one that this code is in). I can set it back to True from a command button and all toolbars and menu's will come back. I thought I read if you hold the shift key down as a bypass then it should still allow toolbars and menu's to be seen but that it not the case for me. Any suggestions or idea's?

TIA,
Shane

' Disable all Menus and Toolbars
Dim i As Integer

For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
 
My problem is resolved by making a little bit of a change. Below is how it was resolved.

I had put the code in the frmNavigators OnClose event, which wasn't firing when the dbase was closing cause on the frmNavigator I have a cmdButton that closes the dbase with DoCmd.Quit. The frmNavigator was not closing so by adding DoCmd.Close acForm,"frmNavigator" before DoCmd.Quit, all is working well now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top