Hi!
This could give you a starting place. My code assumes that you have the passwords stored in a table with the names and/or aliases of the users:
Dim bolAccepted As Boolean
Dim strPassword As String
Dim strStoredPassword As String
Dim rst As DAO.Recordset
Dim lngLength As Long
Dim intCounter As Integer
Set rst = CurrentDb.OpenRecordset("tblUsers", dbOpenDynaset)
bolAccepted = True
If rst.fldUser = txtUserName Then
strPassword = txtPassword
strStoredPassword = rst!fldPassword
If Len(strPassword) = Len(strStoredPassword) Then
lngLength = Len(strPassword)
For intCounter = 1 To lngLength
If Asc(Mid(strPassword, intCounter, 1)) <> Asc(Mid(strStoredPassword, intCounter, 1) Then
bolAccepted = False
Exit For
End If
Next intCounter
If bolAccepted = False Then
Call MsgBox("The passwords do not match. Remember they are case sensitive"

Else
Open form or whatever you want to do
End If
Else
Call MsgBox("The passwords do not match. Remember they are case sensitive"

End If
Else
Call MsgBox("The name you entered is not in the database"

End If
This function will need to actually search for the name (which I forgot to have it do) and you may want to add a form level variable to count and limit the number of attempts. Note, this code has not been tested. Particularly, I have checked ACCII values in years and the function Asc may be different now or had a name change. Look through Access help to find what you need if it doesn't work.
hth
Jeff Bridgham
bridgham@purdue.edu