Try this (if you are dealing with a text field), it is simpler than using a recordset
If DCount("[YourField]", "YourTable", "[YourField] like " & "'" & "*" & yourTxtbox & "*" & "'") > 0 Then
MsgBox "Existing"
End If
I'm not sure how to get it to work for a number field type though...