E
Elizabeth Gallagher
The Query:
SELECT Test.Bname, Test.Week, Sum(Test.SCount) AS SumOfSCount,
DSum("scount","test","(iif([bname]='a',[bname],[bname]))<='" & [bname]
& "' And iif([week]=now,[week],[week])<=#" & [week] & "#") AS RunTot
FROM Test
GROUP BY Test.Bname, Test.Week
ORDER BY Test.Bname, Test.Week;
The Current Result:
Bname Week SumOfSCount RunTot
F 9/26/2010 4 4
F 10/3/2010 3 7
F 10/10/2010 1 8
O 9/26/2010 9 13
O 10/3/2010 3 19
O 10/10/2010 12 32
The Desired Result:
Bname Week SumOfSCount RunTot
F 9/26/2010 4 4
F 10/3/2010 3 7
F 10/10/2010 1 8
O 9/26/2010 9 9
O 10/3/2010 3 12
O 10/10/2010 12 24
Does anyoe have any questions? I am willing to do a subquery if
necessary but I am not sure if that would help.
SELECT Test.Bname, Test.Week, Sum(Test.SCount) AS SumOfSCount,
DSum("scount","test","(iif([bname]='a',[bname],[bname]))<='" & [bname]
& "' And iif([week]=now,[week],[week])<=#" & [week] & "#") AS RunTot
FROM Test
GROUP BY Test.Bname, Test.Week
ORDER BY Test.Bname, Test.Week;
The Current Result:
Bname Week SumOfSCount RunTot
F 9/26/2010 4 4
F 10/3/2010 3 7
F 10/10/2010 1 8
O 9/26/2010 9 13
O 10/3/2010 3 19
O 10/10/2010 12 32
The Desired Result:
Bname Week SumOfSCount RunTot
F 9/26/2010 4 4
F 10/3/2010 3 7
F 10/10/2010 1 8
O 9/26/2010 9 9
O 10/3/2010 3 12
O 10/10/2010 12 24
Does anyoe have any questions? I am willing to do a subquery if
necessary but I am not sure if that would help.