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

MS Access losing all toolbars/menubars etc.

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
0
0
US
I am stumped. Evidently some part of the code below is
wrecking havoc on MS Access. When anyone opens the database
that this code is part of and then they close it down they
lose all toolbars, menubars, etc. from any MS Access DB.
No matter what database that is opened, they have no
toolbars, menubars etc. Can anyone tell me why this would
happen and how to fix it. The code below is the code that
is turning off/turning on toolbars etc. from this one
DB. I am stumped!!

Code:
Private Sub Form_Open(Cancel As Integer)
'   Set frmResize = ADHResize2K.CreateFormResize
       
'     Set frmResize.Form = Me
'Call frmResize.SetDesignCoords(1024, 738, 96, 96)
'    If InStr(UserGroups(), "Admins") > 0 Then
'        Me.Command103.Enabled = True    'Delete ECN button
'    Else
'        Me.Command103.Enabled = False    'Delete ECN button
'End If

''''''''''''''''Hide all toolbars and menubars'''''''''''''''''''

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

ToolbarsOff
 
DoCmd.Maximize
 
End Sub
Private Sub UnHide_Menus_Click()

'''''''''''''Unhide all toolbars and menubars''''''''''''''
Dim I As Integer
For I = 1 To CommandBars.Count
CommandBars(I).Enabled = True
Next I

ResetToolbars

End Sub
Private Sub HideMenus_Click()
Dim I As Integer
For I = 1 To CommandBars.Count
CommandBars(I).Enabled = False
Next I

ToolbarsOff
 
DoCmd.Maximize
End Sub
 
Can you just comment out the code that hides them in the form open event?

"Rome did not create a great empire by having meetings, they did it by killing all those who opposed them."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top