Forum Discussion

Tony2021's avatar
Tony2021
Steel Contributor
Mar 20, 2023

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")
  • InFBL1NInvStrip: IIf(DCount("*","Import_Excel_FBL1N","[Invoice No Stripped] ='" & [Invoice No Stripped] & "' And [Amount in doc curr] = " & [Invoice amount])>0,"Yes","No")
    • Tony2021's avatar
      Tony2021
      Steel Contributor
      Perfect. 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!

Resources