Login Form problem

Do not open a recordset. Do not use FindFirst. Use a domain function for this simple query. All you need to do is use BOTH userID and password as the criteria. Doing it as you are with two separate "FindFirst" operations, you will allow a person to log in as someone else by using the other person's UserID and their own password.

Code:
If dCount("*"), "tblUsers", "UserID = '" & Me.UserID & "' AND Password = '" & Me.Password & "'") = 0 Then
    Msgbox "UserID or Password is invalid, please try again."vbONOnly
    Exit Sub
End If
Excellent solution. It worked smoothly. Thanks a lot!
 

Users who are viewing this thread

Back
Top Bottom