-2

I am getting an error in my querys expression saying syntax error coma in query expression. what is wrong with it?

[FIXED] thanks Gustav

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

SoggyCashew
  • 69
  • 1
  • 4
  • 15

2 Answers2

0

It should read:

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

Or:

Abs(DCount("*","tblEmployeeRequirements","EmpFuncID=" & [EmpFuncID] & "")=DCount("*","tblFunctionRequirements","FuncID =" & [FuncID] & ""))
Gustav
  • 53,498
  • 7
  • 29
  • 55
-1

you should use IFF

checkout this answer:

masasa
  • 260
  • 1
  • 9
  • didnt notice , he can use this then https://stackoverflow.com/questions/772461/case-expressions-in-access – masasa Sep 01 '18 at 16:20