Hello. I'm trying to find out the number of events from a table in each month of the year but my loop case doesn't seem to work. Even though the date fits in one of the cases it doesn't match and goes eventually to case else.
I would appreciate any help with the syntax. Here is my code:

Select Case data
Case data >= #1/1/2016# And data <= #1/31/2016#
months(0) = months(0) + 1
Case data >= #2/1/2016# And data <= #2/29/2016#
months(1) = months(1) + 1
Case data >= #3/1/2016# And data <= #3/31/2016#
months(2) = months(2) + 1
Case data >= #4/1/2016# And data <= #4/30/2016#
months(3) = months(3) + 1
Case data >= #5/1/2016# And data <= #5/31/2016#
months(4) = months(4) + 1
Case data >= #6/1/2016# And data <= #6/30/2016#
months(5) = months(5) + 1
Case data >= #7/1/2016# And data <= #7/31/2016#
months(6) = months(6) + 1
Case data >= #8/1/2016# And data <= #8/31/2016#
months(7) = months(7) + 1
Case data >= #9/1/2016# And data <= #9/30/2016#
months(8) = months(8) + 1
Case data >= #10/1/2016# And data <= #10/30/2016#
months(9) = months(9) + 1
Case data >= #11/1/2016# And data <= #11/30/2016#
months(10) = months(10) + 1
Case data >= #12/1/2016# And data <= #12/31/2016#
months(11) = months(11) + 1
Case Else

End Select