How to give between dats as criteria in the append query

  • Thread starter Thread starter subbu
  • Start date Start date
S

subbu

Hi,
I want to select the records based on a date field.Teh
date field has values for the current and previous
months.How to select records for the current month.I am
using append query

regds
subbanna girish
 
Thanks for the code.Is it possible to extract the current
month date as criteria

subbu


-----Original Message-----
Hi,
I want to select the records based on a date field.Teh
date field has values for the current and previous
months.How to select records for the current month.I am
using append query

regds
subbanna girish

A criterion of

BETWEEN DateSerial(Year(Date()), Month(Date()), 1) AND
DateSErial(Year(Date()), Month(Date()) + 1, 0)

will give you all the records where a date field is within the current
month.

Another way to do it is to put a calculated field in the Query defined
as

Month([datefield])

and use a criterion of Month(Date()), but this will pull results from
all dates in July, no matter which year's July.





.
 
Back
Top