Forum Discussion
#Error in unbound text box
- Jan 20, 2025
Use Nz to return a non-existing value for letterOfCreditID if it is Null:
=DLookUp("Beneficiary","[tblLetterOfCredit]","[LCID]=" & Nz([letterOfCreditID],0) & "")
Use Nz to return a non-existing value for letterOfCreditID if it is Null:
=DLookUp("Beneficiary","[tblLetterOfCredit]","[LCID]=" & Nz([letterOfCreditID],0) & "")
Hi Gustav! that worked! I notice you added the & "" at the end and I didnt notice any difference between keeping it and striking it. It works in both cases though. I have never seen that & "" part though. Interesting. I will keep it in my book of secrets. I thought NZ was the solution but I was using it wrong (=Nz(DLookUp("Beneficiary","[tblLetterOfCredit]","[LCID]=" & [letterOfCreditID]),0)...wrong placement of the 0. I guess sometimes you need to trap at the individual field level, which is what you did.
. =DLookUp("Beneficiary","[tblLetterOfCredit]","[LCID]=" & Nz([letterOfCreditID],0) & "")
^^^
thanks for the tip George! It makes sense. have a good day.