DCount语法错误

时间:2016-01-25 15:47:58

标签: vba ms-access

为什么DCOUNT会导致语法错误?

DCount("[Commercial_name] + [Producer] + [Start_date]", "[Cleaning product]", "[Commercial_name] = '" & Me.PP.Value & "' AND [Producer] = '" & Me.PR.Value & "' AND [Start_date] = '" & Me.Rdate.Value & "'")

在VBA页面上全部在一行

1 个答案:

答案 0 :(得分:0)

这是日期:

DCount("*", "[Cleaning product]", "[Commercial_name] = '" & Me!PP.Value & "' And [Producer] = '" & Me!PR.Value & "' And [Start_date] = #" & Format(Me!Rdate.Value, 'yyyy\/mm\/dd') & "#")