View Full Version : field dependent sums!!!!!!


bendiver
08-11-2001, 04:20 AM
Folks,
Im not even sure if this one can be done but don't see any reason why i shouldn't be possible. I have a query which shows payments for courses, course price and bonumbers. The best way to explain is by example. say there are three payments, two for one booking and one for the other. I need to create a running sum for the two say 100 and 300 on the 300 the sum would be 400 and the third is 100 then its return would be 100. My explanation may be a bit cryptic. What i need is to create a running sum for depending what another value is.

Pat Hartman
08-13-2001, 04:50 AM
Running sums are best calculated in a report. The help entries are pretty clear on how to do this. You can also caluclate a running sum on a form using DSum() provided you have a unique sequential key such as an autonumber or date/time stamp. The DSum() method also works in a query but I would not recommend it for tables of any thing more than a few hundred rows.

[This message has been edited by Pat Hartman (edited 08-13-2001).]