this code is the code of log in section . but it keeps me giving an debug saying
argument are of the wrong type are out of acceptable range , are in conflict with one another
i have a registration section also and it works well
argument are of the wrong type are out of acceptable range , are in conflict with one another
i have a registration section also and it works well
Code:
Dim rs As New ADODB.Recordset
With rs
.Open "SELECT * FROM tblSecurity WHERE Username = '" & txtUser.Text & "'", conn, adOpenStatic, adLockReadOnly
If rs.EOF Then
If txtPass.Text = !Password Then
MsgBox "Username and Password Succesful!"
Else
MsgBox "Invalid Password, Try again!", vbCritical, "Warning"
txtUser.Text = ""
txtPass.Text = ""
txtUser.SetFocus
ctr = ctr + 1
End If
Else
MsgBox "Invalid Login, Try again!", vbCritical, "Warning"
txtUser.Text = ""
txtPass.Text = ""
txtUser.SetFocus
ctr = ctr + 1
End If
If ctr = 3 Then
objLock (True)
MsgBox "You have attempted to Login 3 Times in the system. " & _
"Please call the Programmer for Assistance " _
, vbCritical, "Warning Information"
End If
.Close
Set rs = Nothing
End With
End Sub