SOLVED

IIF and Dlookup

Steel Contributor

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
best response confirmed by Tony2021 (Steel Contributor)
Solution

Hi,

 

Your second DLookUp is missing the closing parenthesis:

 

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

 

Servus
Karl
************
Access News
Access DevCon

Perfect Karl. Thank you very much!
1 best response

Accepted Solutions
best response confirmed by Tony2021 (Steel Contributor)
Solution

Hi,

 

Your second DLookUp is missing the closing parenthesis:

 

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

 

Servus
Karl
************
Access News
Access DevCon

View solution in original post