I have an adodc object in my form. When I execute the following query statement using openrecordset statement, I have 400 records. I got the same number of record when I use the adodc.recordsource/ adodc.refresh statements.
SELECT Inventory.Description, Sales.ItemNo, Sales.SalesDate, Sales.Qty, Sales.Amount, Sales.SH, Sales.BuyerID, Sales.PaidDate, Sales.Shipto, Sales.npbDate, Sales.Remark FROM Sales INNER JOIN Inventory ON Sales.InvCode = Inventory.InvCode Where (((Sales.SalesDate) >= Date() - 3)) ORDER BY Sales.SalesDate, Sales.ItemNo, Sales.BuyerID;
However, when I added the folllowing condition:
And ((Sales.[ItemNo]) Like '*202549*')
The query definition becomes:
SELECT Inventory.Description, Sales.ItemNo, Sales.SalesDate, Sales.Qty, Sales.Amount, Sales.SH, Sales.BuyerID, Sales.PaidDate, Sales.Shipto, Sales.npbDate, Sales.Remark FROM Sales INNER JOIN Inventory ON Sales.InvCode = Inventory.InvCode Where (((Sales.SalesDate) >= Date() - 3)) And ((Sales.[ItemNo]) Like '*202549*') ORDER BY Sales.SalesDate, Sales.ItemNo, Sales.BuyerID;
And my openrecordset statement returns 1 record, while the adodc method return no record.
Why is the inconsistency? What did I do wrong?
Thanks.
Alex
SELECT Inventory.Description, Sales.ItemNo, Sales.SalesDate, Sales.Qty, Sales.Amount, Sales.SH, Sales.BuyerID, Sales.PaidDate, Sales.Shipto, Sales.npbDate, Sales.Remark FROM Sales INNER JOIN Inventory ON Sales.InvCode = Inventory.InvCode Where (((Sales.SalesDate) >= Date() - 3)) ORDER BY Sales.SalesDate, Sales.ItemNo, Sales.BuyerID;
However, when I added the folllowing condition:
And ((Sales.[ItemNo]) Like '*202549*')
The query definition becomes:
SELECT Inventory.Description, Sales.ItemNo, Sales.SalesDate, Sales.Qty, Sales.Amount, Sales.SH, Sales.BuyerID, Sales.PaidDate, Sales.Shipto, Sales.npbDate, Sales.Remark FROM Sales INNER JOIN Inventory ON Sales.InvCode = Inventory.InvCode Where (((Sales.SalesDate) >= Date() - 3)) And ((Sales.[ItemNo]) Like '*202549*') ORDER BY Sales.SalesDate, Sales.ItemNo, Sales.BuyerID;
And my openrecordset statement returns 1 record, while the adodc method return no record.
Why is the inconsistency? What did I do wrong?
Thanks.
Alex