Hello there everyone, I have done a login screen with a video I have found on youtube but my code seems to have errors or an error.
Private Sub btnLogin_Click()
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("Info", dbOpenSnapshot, dbReadOnly)
rs.FindFirst "Username='", Me.txtUserName, "'"
If rs.NoMatch = True Then
Me.lblWrongUser.Visible = True
Me.txtUserName.SetFocus
Exit Sub
End If
Me.lblWrongUser.Visible = False
If rs!Password <> Nz(Me.txtPassword, "") Then
Me.LblWrongPassword.Visible
Me.txtPassword.SetFocus
Exit Sub
End If
Me.LblWrongPassword.Visible = False
DoCmd.OpenForm "Liste"
DoCmd.Close acForm, Me.Name
End Sub
This is the code I used for the login screen but when I tell it to run it gives me "Compile error: Wrong number of arguments or invalid property assignment.I can't seem to get what is wrong with it although rs.FindFirst is flashing blue.I would appreciate any help thanks.