mytaurus2000
Technical User
I HAVE A ORDERS TABLE WITH
SSN, DATE, CANCELED
My code is
SELECT DISTINCT tblOrders.SSN
FROM tblOrders
GROUP BY tblOrders.SSN, tblOrders.Date, tblOrders.Canceled
HAVING (((tblOrders.Date) Between [Forms]![frmReportDialog]![StartDate] And [Forms]![frmReportDialog]![EndDate]) AND ((tblOrders.Canceled)=No));
Which returns the correct value, but on my report I would like to break/group by the date. When I place DATE, in my SELECT statement, it is giving me SSN for each order date. Although the customer may have more than one order, we want to count them just once.
Any ideas??
SSN, DATE, CANCELED
My code is
SELECT DISTINCT tblOrders.SSN
FROM tblOrders
GROUP BY tblOrders.SSN, tblOrders.Date, tblOrders.Canceled
HAVING (((tblOrders.Date) Between [Forms]![frmReportDialog]![StartDate] And [Forms]![frmReportDialog]![EndDate]) AND ((tblOrders.Canceled)=No));
Which returns the correct value, but on my report I would like to break/group by the date. When I place DATE, in my SELECT statement, it is giving me SSN for each order date. Although the customer may have more than one order, we want to count them just once.
Any ideas??