Greetings,
Thanks for responding. Here is the info you requested.
table name: MasterInvoiceTbl
field names:
DateReceived, ProductNumber, ProductName, VendorNbrID, SoldById,
MasterCaseUnits, MasterCaseDescID, FscCategoryID, FscDepartmentID,
UsfCategoryID, ItemSize, CasePrice, QtyReceived.
The fields ending in ID are linked to the appropriate description tables for
each product. I hope this makes sense.
Does the table have a primary key??? Is there any way to uniquely identify a
single record? It's not obvious that the table is properly normalized: is
there a separate product table?
Try this tentative solution: first create a query
SELECT ProductNumber, Min([DateReceived]) AS Earliest
FROM MasterInvoiceTbl
GROUP BY ProductNumber
WHERE DateReceived >= [Enter start date:] AND DateReceived < DateAdd("d", 1,
[Enter end date:]);
Save this as qryProductEarliest.
Then create a second query
SELECT A.*
FROM MasterInvoiceTbl AS A INNER JOIN qryProductEarliest AS B
ON A.ProductNumber = B.ProductNumber
AND A.DateReceived = B.Earliest;
If there are two or more records for a given product both received on the same
date, you'll get duplicates, but it will certainly narrow your search space.