Running Sum not working

  • Thread starter Thread starter Riccardo
  • Start date Start date
R

Riccardo

Hello, i created a report based on a query and i want to have a column in
which i can see the running sum of previous records of a particular query
field. The field name is "Ore_Mo" and the control in which the field is shown
is called "Monte", the control in which i want to see the running sum is
called "Residuo".

Example of what i want:

column1 column2
1 1
3 4

I tried to solve the problem in this way: i set the "Residuo" control
source: =[Ore_Mo], and his RunningSum Property to: All (or group, it changes
nothing).

I see this:

column1 column2
1 1
3 3

If i set the control source of "Residuo" to: =[Monte] the result doesn't
change.
For testing a bit i set the "Residuo" control source to: =Sum([Ore_Mo]) and
i see this:

column1 column2
1 4
3 8

This means that in this case seems to work because: 3+1= 4 (column1) and
4+4=8 (column2, sum of column1+column2).

If i set the "Residuo" control source to: =1 i can see the column counting
the records:

column2
1
2 ecc...

So the running sum doesn't work in the way i need it, but in the others i
tested yes. If someone could help me i would really appreciate.

Thanks
 
Is Ore_Mo a field in your table, or a calculated query field?

- If Table, open the table in design view, and see what its Data Type is. If
it is a Text field (not a Number field), it won't sum correctly. Change the
field to a Number field (or Currency.)

- If Query, run the query, and see how the data is aligned. If it aligns
left, Access is treating the data as Text, and it won't sum correctly.
Typecast the expression, using Val(), Nz(), CCur(), CLng(), CDbl(), or
similar. More info about this in:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html

One you have confirmed that Access understands Ore_Mo as a numeric value,
try these properties for your Residuo text box:
Control Source Ore_Mo
Running Sum Over All
Format General Number
 
Back
Top