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.
基本上它说我缺少运营商?
Dim descpc As String despc = DLookup("[Description]", "[products/stock]", "[Product Code] = " & Me.cmbSource.Value) Me.Text47.Value = despc
任何人都可以发现任何东西吗?我不是 100% 使用 Dlookup,所以任何帮助都会很棒!
谢谢,鲍勃·P
您将 cmbSource 调暗为字符串,因此您需要将值括在单引号中以处理字符串。此外,如果产品代码是一个数字,那么当您尝试将字符串与整数进行比较时,您可能会收到错误消息。试试这个:
despc = DLookup("[Description]", "[products/stock]", "[Product Code] = '" & Me.cmbSource & "'")