Toolbar/Menu question

  • Thread starter shanesullaway via AccessMonster.com
  • Start date
S

shanesullaway via AccessMonster.com

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
 
S

shanesullaway via AccessMonster.com

I have resolved my problem. Below is why is was not working.

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.
 

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