Bruce

  • Thread starter Thread starter Criteria: After this year
  • Start date Start date
C

Criteria: After this year

This is probably very simple, but I cannot seem to figure
it out, and I can't to phrase the question properly in
Google. I would like to create a query in which the
criteria for ExpDate is anything after the last day of the
year. In other words, if the expiration date is this year
I would like to exclude that record. The query would
return only records with an expiration date at some time
next year or later.
 
Try using the year function in your filter expression
year(Expdate) > [year you want to be greater than]
 
Try the following in your criteria for the field

Field: ExpDate
Criteria: >DateSerial(Year(Date())+1,1,0)

That should get anything after Dec 31 of the current year. The DateSerial
function gets the zeroth day of the first month of the current year plus 1. The
zeroth day is the day prior to the first day.
 
Thanks, that did the trick.
-----Original Message-----
Try the following in your criteria for the field

Field: ExpDate
Criteria: >DateSerial(Year(Date())+1,1,0)

That should get anything after Dec 31 of the current year. The DateSerial
function gets the zeroth day of the first month of the current year plus 1. The
zeroth day is the day prior to the first day.



.
 
Thanks for taking the time to reply. I went with the
automated option in the other response.
-----Original Message-----
Try using the year function in your filter expression
year(Expdate) > [year you want to be greater than]

-----Original Message-----
This is probably very simple, but I cannot seem to figure
it out, and I can't to phrase the question properly in
Google. I would like to create a query in which the
criteria for ExpDate is anything after the last day of the
year. In other words, if the expiration date is this year
I would like to exclude that record. The query would
return only records with an expiration date at some time
next year or later.
.
.
 
Back
Top