I can see two solutions to this problem:
1. You can use the
Month() function in the query expression:
Code:
... WHERE Month(Table.DateColumn) = 3
Though simple, this solution can be very slow and un-efficient if the table has many rows, because a call to a VBA function is made for each row of the table.
2. You can base your query on the SQL
Between operator:
Code:
WHERE Table.DateColumn Between #03/01/2013# And #03/31/2013#
In this case, you can encounter a problem if the Time part of the Date was stored in the table (i.e. a non-zero value is stored in the Time part). You would then have to use:
Code:
WHERE Table.DateColumn Between #03/01/2013# And #03/31/2013 23:59:59#
or:
Code:
WHERE Table.DateColumn Between #03/01/2013# And #04/01/2013#
Both expressions yield the same result sets in most cases, if the Time part of the Date/Time value was systematically stored in the table.
Note: The format of a Date/Time expression in a query is fixed and does not depend on the Locale settings of the Control Pannel of Windows. It can be: "
mm/dd/yyyy" (US) or the ISO format "
yyyy-mm-dd", the query builder (if you use it), will automatically convert the ISO format to the US format.