how do I compare a number to the current year?

N

Novice

I Microsoft Access I have a field that contains a 4 digit number that I want
to be able to compare it to the current year. How do I do this?

I am using Microsoft Access 2002.
 
D

Dan Artuso

Hi,
You can't do that directly from a table so I assume you mean you have a form
that displays the number?
You don't say what you want to happen or what kind of comparison you want,
so the only thing I can offer is to use the DatePart function to get the current year:

DatePart("yyyy",Date())

HTH
Dan Artuso, MVP
 
Top