Hello all,

I recently upgraded an app from using DAO with an Access 97 db to ADO with
SQL 7. This statement is now not working:

SELECT DISTINCTROW Count(*) AS [Count Of tblPurchaseItems],
tblPurchaseItems.ItemID, First(tblPurchaseItems.ItemName) AS FirstOfItemName
FROM tblPurchases INNER JOIN tblPurchaseItems ON tblPurchases.OrderNumber =
tblPurchaseItems.OrderNumber WHERE (((tblPurchases.OrderStatus)="completed"
Or (tblPurchases.OrderStatus)="Completed" Or
(tblPurchases.OrderStatus)="COMPLETED") AND ((tblPurchases.OrderDate)
Between #08/31/2000# And #09/30/2000#)) GROUP BY tblPurchaseItems.ItemID;

There are two tables, tblPurchases and tblPurchaseItems. What I need is a
count of all the items in tblPurchaseItems that have a coresponding order
that matches OrderStatus=Complete and the date period. I hope that makes

Any ideas?

Thanks in advace.

Bradley Dean