I have created a module that will enable a custom menubar if it meets the specified requirements. The only problem I have right now is I can not get rid of the standard menu bar. My code I am using is below:
Any ideas?
Code:
Public Function CmdBars()
'This Function will allow for a custom menu bar to be activated and is set by the user's Rights Level.
Dim aEmp As Variant
aEmp = DLookup("RightsLevel", "Users", "UserID='" & Environ("username") & "'")
If aEmp = 100 Then
CommandBars("Menu Bar").Enabled = False
CommandBars("Menu Bar").Visible = False
CommandBars("SOC_Sup_Bar").Enabled = True
CommandBars("SOC_Sup_Bar").Visible = True
End If
If aEmp = 0 Then
CommandBars("Menu Bar").Enabled = False
CommandBars("Menu Bar").Visible = False
CommandBars("SOC_Assoc_Bar").Enabled = True
CommandBars("SOC_Assoc_Bar").Visible = True
End If
End Function
Any ideas?