About Current Month

D

Dado

Hello,
I want to retrieve records in query by current month, avoiding to type date
ranges. I've tried Month(Now()) in date criteria in design view but nothing.
Please help
 
M

Michel Walsh

Hi,


Add the criteria to the Computed Expression (in the first line of the grid):

Month( DateTimeFieldHere)


the criteria being

Month( Now() )


since the full date_time value is definitively not equal to just its month,
we have to reduce the date_time value to only its month, before making the
comparison.

Hoping it may help,
Vanderghast, Access MVP
 
J

John Spencer (MVP)

Try something like:

Field: YourDateField
Criteria: Between DateSerial(Year(Date()),Month(Date()),1) AND DateSerial(Year(Date()),Month(Date())+1,-0)
 
Top