开发者

Wildcards in dlookup

开发者 https://www.devze.com 2023-03-25 13:04 出处:网络
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 th

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

精彩评论

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