Below is the code I have that shows me how many leaks I have
per day. What I need now is to see how many Unique Work Units
I have per day. In the WorkUnitsFaultsMainTBL I have a
field called Work Units. Work Units can be listed multiple
times. I need to come up with a total of Unique Work Units
by day and show the results exactly like the code below
does but I am stumped as how to do this. All help will
be appreciated. It seems like I should be able to somehow
just change fields but I cannot pen it down to show only
unique Work Unit totals.
per day. What I need now is to see how many Unique Work Units
I have per day. In the WorkUnitsFaultsMainTBL I have a
field called Work Units. Work Units can be listed multiple
times. I need to come up with a total of Unique Work Units
by day and show the results exactly like the code below
does but I am stumped as how to do this. All help will
be appreciated. It seems like I should be able to somehow
just change fields but I cannot pen it down to show only
unique Work Unit totals.
Code:
SELECT
Format(TodaysDate,'yyyy-mm-dd') AS [Date],
Count(*) AS [Leak Totals]
FROM
WorkUnitsFaultsMainTBL
WHERE
(((WorkUnitsFaultsMainTBL.Problem) Like "*leak*")
AND
((WorkUnitsFaultsMainTBL.TodaysDate) Between [Forms]![Queries_ReportsFRM]![StartDateTxt] And [Forms]![Queries_ReportsFRM]![EndDateTxt])
AND
((WorkUnitsFaultsMainTBL.BuildID) In ("E010","C809","F001","C810","F187","A910","M173","M174")))
GROUP BY
Format(TodaysDate,'yyyy-mm-dd')
ORDER BY
Format(TodaysDate,'yyyy-mm-dd'), Count(*) DESC;