以下是我的代码:
Forms![OrderForm]![Sku].ControlSource =
"=DLookUp(""[Sku]"",""OrderTable"",
""ItemNumber = '" & Forms![OrderForm]![ItemNumber] & "')"
我运行上面的代码,控制源现在是:
=DLookUp("[Sku]","OrderTable",
"ItemNumber = '1234-BA')
如何更改我的代码,以便在控制源中看到以下内容:
=DLookUp("[Sku]","OrderTable",
"ItemNumber = '" & Forms![OrderForm]![ItemNumber] & "')
答案 0 :(得分:1)
试试这个:
"=DLookUp(""Sku"",""OrderTable"",""ItemNumber='"" & "Forms![OrderForm]![ItemNumber]" & ""'"")"