I tried to find records by using last 4 digits of ssn in dlookup() function, but somehow it didn't work. Can I use the function for partial searching? Thanks for your advice!
strLName = DLookup("lname", "MyTable", "[SSN] ='" & "*" & Forms![FindForm]![txtPartialSSN] & "'")
If IsNull(strLName) Then
MsgBox "This SSN doesn't exist in MyTable!", vbOKOnly, "Info"
Me.txtPartialSSN.SetFocus
Me.txtPartialSSN = ""
Exit Sub
Else
stDocName = "MyForm"
........
strLName = DLookup("lname", "MyTable", "[SSN] ='" & "*" & Forms![FindForm]![txtPartialSSN] & "'")
If IsNull(strLName) Then
MsgBox "This SSN doesn't exist in MyTable!", vbOKOnly, "Info"
Me.txtPartialSSN.SetFocus
Me.txtPartialSSN = ""
Exit Sub
Else
stDocName = "MyForm"
........