Below is the code I have for a query that shows me the number of faults found on a WorkUnit via a date range that is put in via calendars. This works great. It gives me one total for the date range. What I would like to be able to do is see the fault totals by month via a date range. If I put in the date range: Jan 1-April 30 I would like to get four fault totals instead of one. I would like to see the fault totals for each month. Can anyone assist with this?
Code:
SELECT Count(*) AS FaultTotals
FROM WorkUnitsFaultsMainTBL
WHERE (((WorkUnitsFaultsMainTBL.FaultCategory)<>"No Faults") And ((WorkUnitsFaultsMainTBL.TodaysDate) Between Forms!Queries_ReportsFRM!StartDateTxt And Forms!Queries_ReportsFRM!EndDateTxt) And ((WorkUnitsFaultsMainTBL.BuildID) In ("D024","C879","E010","C809","F001","C810","F187","A910","M173","M174","G004","E818","N005","F813")))
ORDER BY Count(*) DESC;