I'm trying to make a username and password form in access 2007. After keeing in the below code, an error message showing "Method or data member not found" what might be the cause?
Code:
Private Sub Command5_Click() Username.SetFocus If Username = "staff1" And Password = "staff1" Then MsgBox "Access granted", vbInformation, "school system2" MsgBox "Welcome", vbInformation, "school system" DoCmd.Close DoCmd.OpenForm "School_system" Else MsgBox "Access denied Please enter your username and password" else if End Sub
Comment