Results 1 to 6 of 6

Thread: Cumulate values

  1. #1
    Join Date
    Nov 2003
    Location
    Slovenia, EU
    Posts
    16

    Exclamation Unanswered: Cumulate values

    Hi,

    does anybody know how to cumulate values in column. For example in C1 are values and in C2 are cumulatives.

    C1 C2
    1 1
    2 3
    3 6
    4 10
    5 15

    Please help me find the right function!
    MS Access 2000 - 2003, WinNT - WinXP

  2. #2
    Join Date
    May 2004
    Posts
    8

    Smile

    would love to know myself how to do it in datasheet view, however, you can easily to that under reports. Just go the running balance options of the field.

  3. #3
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by primus
    Hi,

    does anybody know how to cumulate values in column. For example in C1 are values and in C2 are cumulatives.

    C1 C2
    1 1
    2 3
    3 6
    4 10
    5 15

    Please help me find the right function!
    Hi Primus,
    To get the values for any column in a Form/Report you do this in an Unbound TextBox in the Form/Report Header Or Footer:

    =Sum([C2])
    That's all there is to it.
    have a nice one,
    Bud

  4. #4
    Join Date
    Nov 2003
    Location
    Slovenia, EU
    Posts
    16

    Exclamation RunningSum in a query or table!!!

    Thanks Bud,

    but that is not the right solution. The only thing I would like to do is to find out how to make table or query with two columns. One would be with numbers and second one with running sum. Like already described!

    C1 C2
    1 1
    2 3
    3 6
    4 10
    5 15
    MS Access 2000 - 2003, WinNT - WinXP

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Unhappy

    Quote Originally Posted by primus
    Thanks Bud,

    but that is not the right solution. The only thing I would like to do is to find out how to make table or query with two columns. One would be with numbers and second one with running sum. Like already described!

    C1 C2
    1 1
    2 3
    3 6
    4 10
    5 15
    Hi again primus,
    Thought I understood you better. I take it you know how to create the Table or Query first right? Just asking as I'm not sure of your level of Access usage. Column1 will have a Number in it right? Column2 will have a Cumulative value of what from Column1? What is Column2 to have a running sum of in Column1? My thoughts were you had something like this for the fields:

    [Column1]Quantity of items to buy
    [Column2]Costof the items chosen
    then a TextBox with the calculation in it as:
    =[Quantity]*[Cost]

    Then at the Footer a TextBox with calculation for each line such as this:
    =Sum([Quantity]*[Cost])

    If that isn't what you're seeking then I have to bail out and wait for someone else to come along. But hang in there though...there are many others here.

    have a nice one,
    Bud

  6. #6
    Join Date
    Nov 2003
    Location
    Slovenia, EU
    Posts
    16

    Running sum

    Hi Bud,

    I really apprechiate that you're trying to help me. Thanks a lot! But the thing I need to find out is the sum of all previous records from C1. I have high knowledge in Access programming (and VB of course) so don't really have problems with functions like Sum([field]) in the Footer or Round([field]). But the thing I don't know is how to achiewe the solution of the problem described.

    I will try to present it once again, because would really like to solve it! The thing is that I have only one table with one column C1 in which are values:

    C1
    1
    2
    3
    4
    5

    Now I create querry and put in the first column values from C1.

    so in my querry first column would show:
    C1
    1
    2
    3
    4
    5

    Now I insert second column in querry and would like to insert formula which would show me running sum for values from C1. And the result would be:

    C1 C2(only in querry)
    1 1
    2 3
    3 6
    4 10
    5 15

    So what actually my querry would have to do? I assume somenthing like this:
    C1 C2
    1 sum for row 1
    2 sum (C2 row 1) + (C1 row 2) = 3
    3 sum (C2 row 2) + (C1 row 3) = 6
    4 sum (C2 row 3) + (C1 row 4) = 10
    5 sum (C2 row 4) + (C1 row 5) = 15

    And that's what I am looking for! Only formula which would sum value from previous row in C2 and + current row in C1 !!! The end result would then be a qerry table with C1 and C2 columns and C2 column would be calculated for every row in C1.

    Is that clear now? I can't explain it more detailed.
    Please help!

    Best regards.
    Primus
    MS Access 2000 - 2003, WinNT - WinXP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •