Tony2021
Dec 19, 2022Steel Contributor
DCount
Hello Experts,
I am wanting to check if a table [Import_Excel_FBL1N] has a match on [InvNo]. I am not sure if Dcount is the best way to do this?
Import_Excel_FBL1N.Reference = TEXT
InvNo = TEXT
It sometimes returns a #Error which leads me to believe I am doing something wrong or if I need an Nz check possibly?
=IIf(DCount("*","Import_Excel_FBL1N","[Reference] =" & [InvNo])>0,"Yes","No")
I hope it makes sense. Any questions please let me know.
- If InvNo is text, you need to wrap it in single-quotes:
=IIf(DCount("*","Import_Excel_FBL1N","[Reference] ='" & [InvNo] & "'")>0,"Yes","No")