查询表达式显示零或一

时间:2018-09-01 15:05:28

标签: sql ms-access formula

我的查询表达式中出现错误,查询表达式中出现语法错误逗号。怎么了?

[FIXED]谢谢Gustav

IIf(DCount(“ DateCompleted”,“ tblEmployeeRequirements”,“ EmpFuncID =”&[EmpFuncID])= DCount(“ *”,“ tblEmployeeRequirements”,“ EmpFuncID =”&[EmpFuncID]&“”),1, 0)

2 个答案:

答案 0 :(得分:0)

它应显示为:

IIf(DCount("*","tblEmployeeRequirements","EmpFuncID=" & [EmpFuncID] & "")=DCount("*","tblFunctionRequirements","FuncID =" & [FuncID] & ""),1,0)

或者:

Abs(DCount("*","tblEmployeeRequirements","EmpFuncID=" & [EmpFuncID] & "")=DCount("*","tblFunctionRequirements","FuncID =" & [FuncID] & ""))

答案 1 :(得分:-1)

您应该使用IFF

签出此answer