Thanks for your reponse(s), what i want to achieve is to get the sum total of values from a field called population, but i really don't want the final sum, what i need is to get the sum as you loop through the rows (that's the population value) i.e if
row 1 = 23 (row 1 would be 23 as there's no other row/record before row1)
row 2 = 30 (row 2 would be 30 + the value in row 1)
row 3 = 22 (row 3 would be 22 + the value in row 2), till you reach the last row.
I also want to add a constraint whereby if the sum of the population values in the rows becomes 500, the next row's value would start from zero or the difference that makes the 500 from the previous row. Thanks