SELECT * FROM myDateTable
WHERE date_Start
OR date_end
BETWEEN DateValue('" & CoverMonth_start & "')
AND DateValue('" & CoverMonth_end & "')"
The CoverMonth_start and _end dates are looping from January to December. This query is supposed to select only the records WHERE date_Start OR date_end BETWEEN DateValue.... But this query is selecting all the records in the database.
This is because you are doing
date_Start OR...., this is selecting all the records that has ANY value indate_Startanddate_Endis in the given values range.What you should write is this: