Greetings

Someone please help, I create a login form in access to that user can log in using the user name and password however i am getting an error message
please see script below and let me know whats wrong

Option Compare Database

Private Sub Command1_Click()
If IsNull(Me.txtLogId) Then
MsgBox "Please enter loginID" vbInformation, "LoginID Required"
Me.txtLogId.SetFocus

ElseIf IsNull(Me.Password) Then
MsgBox "Please enter Password" vbInformation, "Password Required"
Me.txtPassword.SetFocus
Else

'process the job
if (IsNull(Dlookup("UserLogin","Users","Userlogin='" & me.txtLogId.Value &"' And Password='" & ,me.txtPassword.value &"'"))) Then

MsgBox "Incorrect LoginID or Password"
Else
MsgBox "LoginID and Password correct"
End If

End If
End Sub

Error message

image

Hello,

Does this question have anything to do with SQL sever

Microsoft Access 2013 Database

This is an ms SQL server forum