Wildcards in dlookup
I am trying to search the a table named "PeopleRecords" for a desk location given only the persons first name. Every time I attempt using a wild card I return "nope". How should I correctly use the wildcard?
param = Nz(DLookup("DeskLocation", "PeopleRecor开发者_开发知识库ds", "[FullName] = '" & FirstName & "'"), "nope")
param = Nz(DLookup("DeskLocation", "PeopleRecords", "[FullName] LIKE '" & FirstName & "*'"), "nope")
Just edit the criteria to LIKE
and add a wildcard (i.e. *
for zero to x characters) after the name.
精彩评论