date format

B

big

Hi,
I have a date column where the date are like this dd/mm/yyyy for exemple
05/11/2003.
I want that user chosses only the year and athe query returns the lines of
that yaer.
How to do ?
Thanks.
 
S

Steve Schapel

Big,

In design view of the query, in the Field row of a blank column of the
query design grid, enter a calculated field similar to this:
MyYear: Year([NameOfYourDateField])

Then, in the Criteria of this column, enter whatever it is that relates
to your "user chooses". For example, if the user is entering the
required year in a textbox on a form, the Criteria would be like this:
[Forms]![NameOfTheForm]![NameOfTheTextbox]
 
Top