开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜