From the debug window
? dateserial(Year(date),month(date)+1,0)
? dateserial(Year(date),month(date),1)
Why are you trying formulae in Excel when you want an Access function and this is an Access forum?

I would get the weekday of the first of the month.
If not a Thursday, calculate the date for the previous Thursday and then use last date of that month.
That is your first week.
Loop and add 7 to the start date until the end date is in the next month and day is less than 7 , to account for a Wednesday as last day of month like this month.
Again adjust the end date for this month, and then the start date for the next month.

Take it all in small steps, one at a time.