Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Part_Information 表,其中 PartNumber 是一个文本字段。在用户在文本框中输入 PartNumber 的表单上,我需要检查该 partNumber 是否存在于表中。我正在使用Dcount方法。
Dcount
DCount(" PartNumber ", "Part_Information", "PartNumber = " & Me.CurrentPartNumber) = 0
但它给出了错误 3464,说标准表达式中的数据类型不匹配。
If PartNumber is a text field, you have to quote the criteria like this:
DCount("PartNumber","Part_Information","PartNumber='" & Me.CurrentPartNumber & "'")