I have a query that shows some basic info on items we've shipped out: ProductID, ProductName, Quantity, Ship Date, etc...
The goal is to pass a date range to the query so I can see "how many of each product was shipped from StartDate to EndDate". Everything works great, except that my products only group by identical rows. So if product #742 had multiple records, because it was shipped on different days, they don't group. I literally just need to pass a date range through and spit out:
ProductID and Sum(Quantity)
but only for the date range specified. How do I do this? Here's what the SQL looks like:
SELECT History.ProductID, Sum(History.Quantity) AS SumOfQuantity, History.ProductName, History.Category, History.Description, History.Method, History.ShipDate
FROM History
GROUP BY History.ProductID, History.ProductName, History.Category, History.Description, History.Method, History.ShipDate
HAVING (((History.Method)="Shipped") AND ((History.ShipDate) Between [Forms]![ReportsMenu]![txtStart3] And [Forms]![ReportsMenu]![txtEnd3]));
Thanks!