stop a running sum

samonwalkabout

Registered User.
Local time
Today, 11:20
Joined
Mar 14, 2003
Messages
185
I have a running sum on a report.

Can i stop the running sum once it reaches a certain number.

Many thanks
 
I think you need to post this in the report section, but perhaps you could make the running sum text box a hidden control and use another calculated control to show the lesser of the limit you want and the value of the running sum text box.
 
You can only stop it if you calculate it manually. You can however add code that makes it invisible after a certain point. In the Format event of the section where the running sum control is defined:

Code:
If Me.RunningSumField > 999 Then
    Me.RunningSumField.Visible = False
Else
    Me.RunningSumField.Visible = True
End If
 
Thanks Guys,

Can i build the running sum in the query itself and put a <[amount] filter in to restrict the amount of data the query feeds into the report.

I have WEEKID and USE. Just want to do running sum of amount each week. Then stop the query once USE get to a certain value, and count the number of weeks.


WEEKID Running USE Until 25
1 10
2 15
3 20
4 30 ------Stop

Hope this makes it easyer to understand not harder :)
 
I found a solution, it was a adaption of a technique dcx693 used in a previous thread using 2 querys. I just needed to get past looking for a Dsum or code solution.

Thanks again.





:)
 

Users who are viewing this thread

Back
Top Bottom