Private Sub Form_Load()
Text9.Value = CurrentUser
'Hide the hidden objects in the navigation pane
Application.SetOption "Show Hidden Objects", False
'Lock navigation pane
DoCmd.LockNavigationPane True
'Disable right clicks and menus
CurrentDb.Properties("AllowFullMenus") = False
CurrentDb.Properties("AllowShortcutMenus") = False
CurrentDb.Properties("AllowBuiltinToolbars") = False
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Call DoCmd.NavigateTo("acNavigationCategoryObjectType")
Call DoCmd.RunCommand(acCmdWindowHide)
End Sub
Private Sub Command43_Click()
'Admin Button Bring back nav and other views that are hidden
Call DoCmd.SelectObject(acTable, , True)
'UnHide the hidden objects in the navigation pane
Application.SetOption "Show Hidden Objects", True
'Unlock navigation pane
DoCmd.LockNavigationPane False
'Enable right clicks and menus
CurrentDb.Properties("AllowFullMenus") = True
CurrentDb.Properties("AllowShortcutMenus") = True
CurrentDb.Properties("AllowBuiltinToolbars") = True
DoCmd.ShowToolbar "Ribbon", acToolbarYes
DoCmd.SelectObject acTable, , True
End Sub