The difficult I do immediately, the impossible takes a little bit longer.

You already have your Main Menu (Switchboard) but now you don't want your Users to get access to all the Forms and/or you may only want to assign certain *permissions* based on their level.  Here's a technique that will do just that.  You can find another way here.  (Please read all the way thru before implementing!)

Assign *Permissions* based on Users Level...

Forms
Make Controls resize with a form  (Access 2007 and higher)
Switch Windows  (Access 2007 and higher)

Private Sub Form_Load()
On Error Resume Next

Dim rst As DAO.Recordset
Dim db As DAO.Database
Dim myQuery As String

myQuery = "SELECT * FROM tblUsers WHERE uNetworkID = '" & Environ("UserName") & "'"

Set db = CurrentDb()
Set rst = db.OpenRecordset(myQuery, dbOpenDynaset, dbSeeChanges)

     If Not rst.BOF And Not rst.EOF Then
       rst.Edit
       rst.Fields("uLogonCount") = rst.Fields("uLogonCount") + 1
       rst.Fields("uLastLogon") = Now()
       rst.Update
        Me.txtSecurityID = rst.Fields("uSecurityID")
        Me.txtOverride = rst.Fields("uSpecialPermissions")
        Me.txtUserID = rst.Fields("uUserID")
        Me.txtDelete = rst.Fields("uDelete")
        Me.txtPassword = rst.Fields("uPassword")
       DoEvents
     Else
       DoCmd.OpenForm "frmNewUser", acNormal, , , , acWindowNormal
       Me.Dirty = False
       Me.Visible = False

       Do Until Me.Tag = "Continue"
         DoEvents
       Loop
     End If

Set rst = Nothing
db.Close
Set db = Nothing

          If IsDeveloper Then
             ChangeProperty "AllowBypassKey", dbBoolean, True
          Else
             ChangeProperty "AllowBypassKey", dbBoolean, False
          End If

Form_Load_Exit:
Exit Sub
End Sub

Private Sub cmdTemporaryAccess_Click()
On Error Resume Next

Dim pwd As String

pwd = InputBox("Please enter password", "ADMIN Access")

If pwd = DLookup("uPassword", "tblUsers", "uNetworkID = '" & Environ("UserName") & "'") Then
Me.txtSecurityID = 13
MsgBox ("You can now enter the Administrative area!")
Else
MsgBox ("Incorrect password")
End If
End Sub

Private Sub cmdDelete_Click()

If Forms![frmMainMenu]![txtSecurityID] <> 13 And Forms![frmMainMenu]![txtDelete] = False Then
   DoCmd.CancelEvent
MsgBox "Please see ADMIN's " & ConcatRelated("ADMINNames", "qryADMINs", "uSecurityID = " & 13) & " to DELETE records!", vbCritical, "Permissions"
Exit Sub
End If

Dim intResp As Integer

intResp = MsgBox("This will remove the record from your system! Are you sure?", vbYesNo + vbExclamation, "Delete")

If intResp = vbYes Then

   Call LogDeletion(Me.txtOrderID, "frmOrders", "Order " & Me.txtOrderID & " has been successfully deleted!")
   MsgBox "Deleted successfully"
Else
   DoCmd.CancelEvent
End If
End Sub

Step 1...

In your Table where you keep your Users information add whichever fields are missing from your table from the one below.  *txtDepartmentID* is *optional* as we will not be using it in this example.  (You can name them whatever you like, however, make sure you follow that field name change throughout the rest of the code on this page.)

To capture this information I use a Log On form once.  The User enters their First Name, Last Name and eMail Address and I *capture* the balance.  Further down I show how.  Doing it this way I don't have to pester the User with logging on every time they want to open the database.  Initially, their permission is set to *Read Only*.  To change it to *Read/Write* you will need an ADMIN.

Step 2...

If you don't already have one, set up tblSecurity, as shown below.  Again, if you already have one under a different name you will need to change he code accordingly.  You only need to enter the three entries shown below.  The ones with nothing under *sSecurity* are not used in this example.

Step 3...

On your Main Menu (or Switchboard) you will need 6 hidden unbound fields named...

1.  txtSecurityID
2.  txtOverride
3.  txtUserID
4.  txtDelete
5.  txtDepartmentID *Optional, not used in this example!
6.  txtPassword

Step 4...
And now let's add the code...

Copy and paste the code between *Private Sub Form_Load()* and *End Sub* to the On_Load event of your Main Menu/Switchboard.  ( Reminder , check the field names to make sure they are reflected below if you are not using the ones assigned above.)

Step 5...

The section enclosed in brackets is optional, it can be deleted with no reprecussions.  However, you will need some way to capture this information.  To apply this section to your Main Menu/Switchboard click *frmNewUser* to see the Form and the code.

Examples of Use...
A *Delete* button...
Form *On_Current* events...

Private Sub Form_Current()
On Error Resume Next

     If Forms![frmMainMenu]![txtSecurityID] = 9 Then
       fncLockUnlockControls Me, True
     Else
       fncLockUnlockControls Me, False
     End If

End Sub


Private Sub Form_Current()
On Error Resume Next

     If Forms![frmMainMenu]![txtSecurityID] <> 13 And Forms![frmMainMenu]![txtOverride] = False Then
       fncLockUnlockControls Me, True
     Else
       fncLockUnlockControls Me, False
     End If

End Sub

Function IsDeveloper() As Boolean

     Dim UserName As String
     IsDeveloper = False
     UserName = VBA.Environ("Username")

     Select Case UserName
      Case "Your NetworkID goes here"
        IsDeveloper = True
      Case Else
        IsDeveloper = False
     End Select

End Function

*Optional*  Now we are going to add the *Temporary Access* button.  This button can be used for several purposes, such as, giving a User temporary ADMIN abilities or with some additonal code the ability to delete when that is only reserved for ADMIN's.

Add a button to your Main Menu/Switchboard and name it *cmdTemporaryAccess*.  You can put whatever image or caption you want on the button, I use a key icon.

Copy and paste the code between *Private Sub cmdTemporaryAccess_Click* and *End Sub* to the On_Click event of the button.  ( Reminder , check the field names to make sure they are reflected below if you are not using the ones assigned above.)

And finally...
Create a Form to manage the information...
Lock Users out of a Menu/Switchboard button...
On my Main Menu I used and Option Group with Toggle Buttons so the code to lock a User out is on the Option Group.

Private Sub CategoryButton_BeforeUpdate(Cancel As Integer)
On Error Resume Next

If Me.txtSecurityID <> 13 And Me.CategoryButton = 5 Then
DoCmd.CancelEvent
MsgBox "Please see ADMIN's " & ConcatRelated("ADMINNames", "qryADMINs", "uSecurityID = " & 13) & " for access to this area!", vbCritical, "Permissions"
Me.Category = 1
Exit Sub
End If

End Sub

Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer

   Dim dbs As Object, prp As Variant
   Const conPropNotFoundError = 3270
 
   Set dbs = CurrentDb
   On Error GoTo Change_Err
   dbs.Properties(strPropName) = varPropValue
   ChangeProperty = True
Change_Bye:
   Exit Function
Change_Err:
   If Err = conPropNotFoundError Then ' Property not found.
       Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
       dbs.Properties.Append prp
       Resume Next
   Else
       ' Unknown error.
       ChangeProperty = False
       Resume Change_Bye
   End If

End Function

Create a Module, mine is named modUtilities, and copy/paste the IsDeveloper() and ChangeProperty() code shown below into the Module.  Do not paste behind the Form these two Functions must be a seperate Module.

aaaaaaaaaaaaiii