Forum Discussion

Tony2021's avatar
Tony2021
Steel Contributor
Dec 15, 2021

Running Balance query

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

  • you do not need to use DMax() function,
    just do a simple addition:

    Balance: [CurrentAmt]+[AmountOfChange]
  • arnel_gp's avatar
    arnel_gp
    Steel Contributor
    you do not need to use DMax() function,
    just do a simple addition:

    Balance: [CurrentAmt]+[AmountOfChange]
    • Tony2021's avatar
      Tony2021
      Steel Contributor

      arnel_gp 

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

Share

Resources