Date field in query

  • Thread starter Thread starter klr
  • Start date Start date
K

klr

I need to add criteria to pull through all records where visit date is
current month and next 2 months (i.e. 01.09.06 to 30.11.06). Can
anyone advise what I should do?

Many thanks

KLR
 
I there are better ways but this will do it.

Between Date()-Day(Date())+1 and DateAdd("m",3,Date()-Day(Date())+1)-1
 
In design mode of the query, in the Selection Criterion "cell" under the
field [VisitDate], you'd use something like (your syntax may vary):

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

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top