Private Sub btnOK_Click()
If IsNull(Me.txtUsername) Then
MsgBox "Please enter your username.", vbInformation, "Username Is Required"
Me.txtUsername.SetFocus
Else
If IsNull(Me.TxtPassword) Then
MsgBox "Please enter your password.", vbInformation, "Password Is Required"
Me.TxtPassword.SetFocus
Else
If (IsNull(DLookup("[Username]", "Employee_Login_Details", "[Username] ='" & Me.txtUsername.Value & "' And password = '" & Me.TxtPassword.Value & "'"))) Then
MsgBox "Incorrect username or password. Please try again.", vbInformation, "Incorrect Login Details"
Else
MsgBox "Correct username and password.", vbInformation, "Correct Login Details"
End If
End If
End If
End Sub
this is the current code