calculation of running balance using a query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mauking
    New Member
    • Mar 2008
    • 1

    calculation of running balance using a query

    Hello Everyone,

    Im a certified public accountant here in the Philippines. Im using microsoft access 2000 and 2003 running in a Windows XP environment.

    Im having a problem of how to calculate a running balance using a query coming from two tables.

    This is my problem. I have two tables (Sales and Collections), with these table I wanted to have a query to recalculate a running balance everytime there is a sales and collections transactions.

    Thank you,

    King
  • Scott Price
    Recognized Expert Top Contributor
    • Jul 2007
    • 1384

    #2
    Does [CODE=sql]SELECT Sum(tblSales.Sa les) As [SumOfSales] FROM tblSales[/CODE] not work for you?

    To make it recalculate whenever there is an additional Sales entry you just need to add a code line in the AfterUpdate event of whatever control is used to update the Sales figure:
    Code:
    DoCmd.Requery ("[QueryName]")
    Regards,
    Scott

    Comment

    • Scott Price
      Recognized Expert Top Contributor
      • Jul 2007
      • 1384

      #3
      This can also be done from within an unbound text box on your form where the totals are entered using something like this:
      Code:
      =Sum(DLookup("Sales", "tblSales"))
      Regards,
      Scott

      Comment

      Working...