Add a local table named YrMos using the following code, adjusting the Start/End years as necessary (note: I'm using RunSQL here only because it is DAO/ADO agnostic; there are better alternatives specific to DAO and ADO):
Sub CreateYrMos()
Const StartYear = 1950
Const EndYear = 2050
Dim Y As Integer, M As Integer
DoCmd.SetWarnings False
DoCmd.RunSQL "CREATE TABLE YrMos " & _
"(MoStart DATE CONSTRAINT MoStartIndex PRIMARY KEY, " & _
" MoEnd Date CONSTRAINT MoEndIndex UNIQUE, " & _
" Yr Integer, Mo Integer, DaysInMo Integer, " & _
" CONSTRAINT YrMoIndex UNIQUE (Yr, Mo))"
For Y = StartYear To EndYear
For M = 1 To 12
DoCmd.RunSQL "INSERT INTO YrMos (MoStart, MoEnd, Yr, Mo, DaysInMo) " & _
"VALUES (#" & DateSerial(Y, M, 1) & "#, #" & DateSerial(Y, M + 1, 0) & "#, " & Y & ", " & M & ", " & Day(DateSerial(Y, M + 1, 0)) & ")"
Next M
Next Y
DoCmd.SetWarnings True
End Sub
Once you've created the table using the above code, the actual query becomes trivial:
SELECT YrMos.*
FROM YrMos
WHERE MoStart BETWEEN #1/1/2010# AND #5/1/2010#
I keep a local copy of this table (with an appropriate range of years for my needs) within several of my access applications. I've found it to be a much more efficient and practical approach than other more 'elegant' solutions.