Create a table of usernames & respective passwords (call tblEmployees). Then a form (frmLogon) to enter user & pass and have that load on db load. On the form have a text box (txtEmployee) where they enter user name, and have a text box (txtPassword) to enter password. Have a button (cmdLogin) and put the code below behind the button.
Have code to cross check user & password entry to the table that contains the data. If it is correct then access granted and it can open up whatever form you need, if not then access denied.
Code:
Private Sub cmdLogin_Click()
'make sure a username is entered
If IsNull(Me.txtEmployee) Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.txtEmployee.SetFocus
Exit Sub
End If
'make sure a password is entered
If IsNull(Me.txtPassword) Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If
'check password in tblEmployees to make sure it matches with username selected
If Me.txtPassword.Value = DLookup("strEmpPassword" this is table field name, "tblEmployees", "[lngEmpID]=" & Me.txtEmployee.Value) Then
lngMyEmpID = Me.txtEmployee.Value
'Close logon form and open your form
DoCmd.Close "frmLogon"
DoCmd.OpenForm "Your_Form_Name"
Else
MsgBox "Password Invalid. Please Try Again.", vbOKOnly, "Invalid Entry"
Me.txtPassword.SetFocus
End If
End Sub