SOLVED

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.  

 

Tony2021_0-1639586210292.png

 

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)
Solution
you do not need to use DMax() function,
just do a simple addition:

Balance: [CurrentAmt]+[AmountOfChange]

@arnel_gp 

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

1 best response

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

Balance: [CurrentAmt]+[AmountOfChange]

View solution in original post