current month

  • Thread starter Thread starter rml
  • Start date Start date
R

rml

What would be the proper syntax for a query to return the
records for the current month? I would like it to work
like date() but for the month.

Thanks.
 
Would it be safe to assume that you do not want to find all records for July
(any year), but only for July, this year?

If so, consider using the DateSerial () function, in something like:

Between DateSerial(Year(Date()), Month(Date), 1) And
DateSerial(Year(Date()), Month(Date)+1, 0)

This takes advantage of the fact that the "zeroth" day of the next month
(Month(Date())+1) is the last day of this month.
 
Back
Top