Forum Discussion
Tony2021
Jun 02, 2022Steel Contributor
Nz and Dsum
Experts,
How would I add Nz to the below AmendSum Dsum statement? I think I need to add Nz if the "Amount" is null. The amount is NULL in tblFXAmends where IDFXfk]= & [ID] (I did set the default value to 0 but there are a few records that are still NULL)
AmendSum: Format(DSum("Amount","tblFXAmends","[IDFXfk]=" & [ID]),"Standard")
this is my entire query:
SELECT tblBanks.BankID, tblFX2.Notional, Format(DSum("Amount","tblFXAmends","[IDFXfk]=" & [ID]),"Standard") AS AmendSum, Nz([Notional],0)+(DSum("Amount","tblFXAmends","[IDFXfk]=" & [ID])) AS GTotal
FROM tblFX2 INNER JOIN tblBanks ON tblFX2.Bank = tblBanks.BankID;
thank you
- Just add Nz in the following concept
Nz(Dsum("field","table","Criteria"),0)