Forum Discussion

Tony2021's avatar
Tony2021
Steel Contributor
Jan 09, 2022
Solved

IIF and Dlookup

Hello Experts,

 

I am getting a wrong number of arguments error on the below.  Obviously I have a misplaced comma or quote or maybe something else I dont see.  If the Dlookup =0 then I want to return the Dlookup..."CurrentAmt" but if false then return the Dlookup..."Balance"

 

thank you in advance for the help.

 

=IIf(DLookUp("Balance","[UnonLCActive]","[letterofcreditID]=" & [LCID])=0, DLookUp("CurrentAmt","[UnonLCActive]","[letterofcreditID]=" & [LCID], DLookUp("Balance","[UnonLCActive]","[letterofcreditID]=" & [LCID]))

2 Replies