Menus gone!

CALV

Registered User.
Local time
Today, 14:01
Joined
Apr 25, 2001
Messages
74
Hi all,

I've been securing my dbase by disabling shift/f11 etc which all works fine, only now my "admin mode" wont work! the code I use to disable toolbars etc is :

Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

but when I do the OPPOSITE, from the click of my admin button (which will have password), they dont come back!

Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = true
Next i

All I have is File, Window, and Help !!, I can get to the dbase window using
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowUnHide

but thats all!, no right clik on the form to change view etc, I assume I've missed something simple?

TIA

CALV
 
Don't know if this will make the difference...

CommandBars(i).Enabled = True
 
CALV,

I have been posting that code as a toolbar/menubar solution for over a year. Are you sure that the code is running when you try to unhide the toolbars and menubars?

Check out this old thread where I posted a sample db that has two different methods for hiding and unhiding the toolbars and menu bars. It is at the bottom of this thread.

Getting rid of the menu bars

HTH
 

Users who are viewing this thread

Back
Top Bottom