Running sum

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm sure this suggestion was given before, but I couldn't find one.

Adding the option of running sum to a field, will solve two problems that I
know of:
1. To show the running sum, just as the report does, without extra programming
2. Will display a running counter in the form, when the control source set
to =1, with running sum

I apologize if this suggestion was given before

--
I hope that helped
Good luck

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...a35a87929388&dg=microsoft.public.access.forms
 
hi,



Can be done in a Query.


SELECT a.ClientID, a.DateTime, LAST(a.qty), SUM(b.qty) As runningSum
FROM myTable As a INNER JOIN myTable As b
ON a.clientID = b.ClientID AND a.DateTIme >= b.DateTime
GROUP BY a.ClientID, a.DateTime
ORDER BY a.ClientID, a.DateTime ASC




will sum the qty, up to the actual record, per client, and "previous" record
is defined as a record occuring with a lesser DateTime that the "actual"
DateTime.


The ORDER BY clause is not necessary, I only included it so you can visually
easily check the accuracy or the solution.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top