How do I Produce a Running Sum

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • said asmatullah
    New Member
    • Sep 2011
    • 3

    How do I Produce a Running Sum

    i have to tables
    1...... table1(ID autonumber ,CUSTOMERNAME text)
    2..... table2(ID number, DATE date/time,DEBIT currency,CREDIT currency,BALANC E currency)


    table1 ID have 1 to many relationship with table2 ID

    i need running sum for balance column looks like

    ID DATE DEBIT CREDIT BALANCE
    1 1/1/11 1000 0 1000
    1 1/2/11 2000 1000 2000
    1 1/3/11 0 500 1500
  • Narender Sagar
    New Member
    • Jul 2011
    • 189

    #2
    Dear Asmatullah,
    Adaab!
    I will recommend that there is no need to have field like "Balance" in table 2.You can calculate this in a query and display it on any form.
    However, you can create a calculated field in Access 2010. (I am not quite sure of Access 2007) but this feature is not there in earlier versions for sure.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32634

      #3
      You should only ever consider doing this in a report. Report controls have a property to handle doing this for you automatically.

      Comment

      • said asmatullah
        New Member
        • Sep 2011
        • 3

        #4
        please how to do without balance ?

        Comment

        • said asmatullah
          New Member
          • Sep 2011
          • 3

          #5
          thanks
          but i know how to do in report i want this in formbase

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            You can use a subquery or inner join the table to itself.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32634

              #7
              Originally posted by Said
              Said:
              but i know how to do in report i want this in formbase
              I'm telling you only ever to do it in a report as doing it elsewhere is not going to help you.

              You can ignore me of course - that's your choice. However, asking for help to do it a way I've recommended against doesn't make a lot of sense to me. I assume you realise I'm not going to do that.

              Comment

              Working...