Forum Discussion
Tony2021
Mar 20, 2023Steel Contributor
Dcount Multiple Criteria
Hello Experts,
I am trying to add an additional criteria but I am not getting the result I expect. I am not getting any error messages but it returns "yes" for each record and that is not correct so I assume something is off. [Invoice No Stripped] is a text field.
Do you see anything wrong? The field names have spaces and they are not my names.
InFBL1NInvStrip: IIf(DCount("*","Import_Excel_FBL1N","[Invoice No Stripped] ='" & [Invoice No Stripped] & "'" And "[Amount in doc curr] = " & [Invoice amount])>0,"Yes","No")
thank you
- InFBL1NInvStrip: IIf(DCount("*","Import_Excel_FBL1N","[Invoice No Stripped] ='" & [Invoice No Stripped] & "' And [Amount in doc curr] = " & [Invoice amount])>0,"Yes","No")
- Tom_van_StiphoutSteel ContributorInFBL1NInvStrip: IIf(DCount("*","Import_Excel_FBL1N","[Invoice No Stripped] ='" & [Invoice No Stripped] & "' And [Amount in doc curr] = " & [Invoice amount])>0,"Yes","No")
- Tony2021Steel ContributorPerfect. I see where the issue is.
"[Invoice No Stripped] ='" & [Invoice No Stripped] & "'"
should be:
"[Invoice No Stripped] ='" & [Invoice No Stripped] & "'
very tricky. thank you. It works great!