D
Douglas J. Steele
First of all, you need to use Like rather than = for wildcards to work.
Second, I believe that DLookup still uses DAO, so that you need * as the
wildcard character, not %.
ID = DLookup("[man_id]", "[tblmanufact]", _
"[man_name] Like '*" & Me.txtFindPart.Value & "*'")
(exagerated to show quotes, "[man_name] Like ' * " & Me.txtFindPart.Value &
" * ' ")
You could also use Chr$(34) (34 is the Ascii value of "):
ID = DLookup("[man_id]", "[tblmanufact]", _
"[man_name] Like " & Chr$(34) & "*" & Me.txtFindPart.Value & "*" &
Chr$(34))
Second, I believe that DLookup still uses DAO, so that you need * as the
wildcard character, not %.
ID = DLookup("[man_id]", "[tblmanufact]", _
"[man_name] Like '*" & Me.txtFindPart.Value & "*'")
(exagerated to show quotes, "[man_name] Like ' * " & Me.txtFindPart.Value &
" * ' ")
You could also use Chr$(34) (34 is the Ascii value of "):
ID = DLookup("[man_id]", "[tblmanufact]", _
"[man_name] Like " & Chr$(34) & "*" & Me.txtFindPart.Value & "*" &
Chr$(34))