Hi Duane, Ordered on description from table Client Data
I basically want to add up all the entries for small eggs (3 in total,
12+6+6) which gives a stock value = 24
then all entries for medium (2 in total, 6+6) = 12
Then a running cumulative figure for all eggs
Thanks, Garry
Duane Hookom said:
You haven't described an order which is required if you want to create a
running sum. It looks like your current "order" is Description DESC.
Try something like:
SELECT N.Description, N.Stock ,
(SELECT Sum(Stock) FROM tblNoName N2 WHERE N2.Description >=N.Description)
As Cumulative
FROM tblNoName N
ORDER BY N.Description;
--
Duane Hookom
Microsoft Access MVP
Garry said:
The report wizard lets me sum by group, I can then cumulatively add the
sum
of all groups as
for example :-
description Stock cumulative
small eggs 24 24
medium eggs 12 36
large eggs 10 46
How can I express this as a query
Hope I have explained, cheers
You should be able to do most anything (datawise) in a query that you
can
do
in a report. Maybe you can explain exactly what you have, what you
want,
and
why.
--
Duane Hookom
Microsoft Access MVP
:
Hi all
I have a sum in a report as follows :-
Control Source=Sum([No Records])
Running Sum = Over Group
My question is how can I transfer this to a query
Another thought, can I make a table from a reports output ?
Thanks, ps I might be barking up the wrong tree