I got the example
here is my full SQL
SELECT test.WareHouse AS WarehouseAlias, Sum(test.Qty) AS SumOfQty, DSum("WareHouse","Test","[Qty]<=" & [WarehouseAlias]) AS RunTot
FROM test
GROUP BY test.WareHouse;
I don't have the Northwind db for 2007
I have another PC with Acc2002 and tried the example on Northwind in 2002 and it works perfect.
DougP
< I love mine
here is my full SQL
SELECT test.WareHouse AS WarehouseAlias, Sum(test.Qty) AS SumOfQty, DSum("WareHouse","Test","[Qty]<=" & [WarehouseAlias]) AS RunTot
FROM test
GROUP BY test.WareHouse;
I don't have the Northwind db for 2007
I have another PC with Acc2002 and tried the example on Northwind in 2002 and it works perfect.
DougP
![[r2d2] [r2d2] [r2d2]](/data/assets/smilies/r2d2.gif)