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.
我正在使用带有组合框 (LaborType) 和文本框 (LaborCost1) 的表单我在组合框的更新后事件中有以下代码,无论条件如何,它都会返回相同的值。
[LaborCost1] = DLookup("LaborCost", "LaborTypesAndCost", LaborType = Me.LaborType)
如果LaborType是数字:
LaborType
DLookup("LaborCost", "LaborTypesAndCost", "LaborType = " & Me.LaborType)
如果LaborType是文本:
DLookup("LaborCost", "LaborTypesAndCost", "LaborType = '" & Me.LaborType & "'")