Running Balance query

Steel Contributor

Hello experts, 


I have a query that shows a [Balance] but I am not sure why the math is off.

I enter an amount [CurrentAmt] (this is a manual entry)

I enter an amendment ([AmountOfChange] (this is a manual entry)

Calculated Field:

Balance: [CurrentAmt]+DSum("AmountOfChange","tblLCAmendHistory","letterOfCreditID=" & [tblLCAmendHistory].[letterOfCreditID] & " And [ID] <= " & [tblLCAmendHistory].[ID])


==>The 3rd record doesnt seem to be correct.  




thank you for the help!


FYI: this is a follow up to (but I think it is a little different)

Re: Balance Report - Microsoft Tech Community

2 Replies
best response confirmed by Tony2021 (Steel Contributor)
you do not need to use DMax() function,
just do a simple addition:

Balance: [CurrentAmt]+[AmountOfChange]


Perfect!  the solution was so obvious.  I was thinking too much into it.  I am going to ask another similar question.