TRANSFORM Sum(T_SalesPlanByDate.iQuantity) AS Quantity
SELECT T_SalesPlanByDate.cInvAddCode
FROM T_SalesPlanByDate
WHERE T_SalesPlanByDate.dDate Between #10/15/2006# And #10/21/2006#
GROUP BY T_SalesPlanByDate.cInvAddCode
PIVOT T_SalesPlanByDate.dDate;