dlookup不工作!! [英] dlookup not working!!
问题描述
我已经在桌子上敲了一下我花了几个小时在网上搜索但是我发现什么是错的...(顺便说一下,我很难进入..)
我有一个客户表,其中包含客户信息,另一个表是客户交易。我在客户tranasactions表中有一个查找框,用于查找客户代码。我希望客户名称和收货地址自动弹出他们的字段..
i尝试在事件后使用此功能:
CustomerName = dlookup("客户名称,客户,customerCode ="&CustomerCode
但我每次尝试都会遇到不同的错误。
感谢所有回复的人..
i''ve beat my head on the table for this n spent hours searching the net but i cant find out whats wrong.. (btw, i''m pretty new to access..)
i''ve got a Customers table with information on customers, and another table, Customer Transactions. ive got a lookup box in the customer tranasactions table that looks up the customer code. i want the customer name and delivery address to automatically pop in their fields..
i tried using this in the after event:
CustomerName= dlookup("CustomerName","Customers","customerCode=" & CustomerCode)
but i get different errors everytime i try it.
thanks to anyone who replies..
推荐答案
hi,
欢迎来到字节
试试这段代码,在afterupdate触发器中使用表格和表格中的名称
Welcome to bytes
try this code, in afterupdate trigger use the names as in your table and form
Mseo,我不确定你要去哪里。看起来您假设客户代码未知且需要查找。我认为情况并非如此。
Jasmineeyes,您不会说客户代码是数字还是字母。如果是alpha,则需要在其周围加上引号。 (这是一个非常常见的错误)。
试试这个
Mseo, I''m not sure where you are going with that. Looks like you are assuming the customer code is not known and needs to be looked up. I think that''s not the case.
Jasmineeyes, you don''t say whether customer code is numeric or alpha. If it is alpha, you need to wrap quote marks around it. (It''s a very common error).
Try this
嗯,不知道我的帖子发生了什么......代码中有很多空行。
Hmmm, wonder what happened to my post ... it''s got a lot of blank lines in the code.
这篇关于dlookup不工作!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!