I suggest you change your approach. Start with
StartDate = CreateDate(TheYearYouWant, TheMonthYouWant, 1);
EndDate = DateAdd("m", 1, StartDate);
and the date filtering of your query becomes:
where closed_date >=
and closed_date <
This will execute faster than using functions in your where clause.