Hey, Im tryin to create something like a login, but always when I go to use DLookup to search the Table I get a error 2001 can't really tell why
[vba]
Private Sub Command11_Click()
Dim Search_Result_Username As Variant
Dim Search_Result_Password As Variant
Dim Search_User As String
If IsNull(Me!Text2) Then
MsgBox "Please enter Username", vbOKOnly, "Invalid Username"
Else
Search_User = Me!Text2
End If
Dim Search_Password As String
If IsNull(Me!Text6) Then
MsgBox "Please enter Password", vbOKOnly, "Invalid Password"
Else
Search_Password = Me!Text6
End If
If IsNull(Search_User) = False Then
Search_Result_Username = DLookup("[Entrance Allowance]", "db_Users", [Search_User])
If (Search_Result_Username) = False Then
MsgBox [Search_Result_Username], vbOKOnly, "Found"
End If
Else
End If
If IsNull(Search_Password) = False Then
Search_Result_Password = DLookup("[Entrance Allowance]", "db_Users", Search_Password)
If (Search_Result_Password) = False Then
MsgBox [Search_Result_Password], vbOKOnly, "Found"
End If
Else
End If
End Sub
[/vba]
Text2 and Text6 are Textboxes
Entrance Allowance is a Yes/No Field
I have to do this as a project for school so fast help is appreaciated
Thanks in Advance =)