Date Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matrekz42
    New Member
    • Sep 2007
    • 37

    #1

    Date Query

    Good afternoon,

    Maybe this is an easy task but I cant seem to figure it out. I want to create a query that will be linked to a list in a form, which has years ie: 2007,2008,etc.. .

    I want to query a field that has 01/02/2007 but get everything that's in 2007 by only the year that the user selected in the form.

    I know how to link it to the form ie:[Forms]![Report Form]![List27], but what formula or what should I use for the query to only recognize a piece of the by the year?
  • DonRayner
    Recognized Expert Contributor
    • Sep 2008
    • 489

    #2
    Originally posted by matrekz42
    Good afternoon,

    Maybe this is an easy task but I cant seem to figure it out. I want to create a query that will be linked to a list in a form, which has years ie: 2007,2008,etc.. .

    I want to query a field that has 01/02/2007 but get everything that's in 2007 by only the year that the user selected in the form.

    I know how to link it to the form ie:[Forms]![Report Form]![List27], but what formula or what should I use for the query to only recognize a piece of the by the year?
    Take a look at the datepart() function

    Comment

    Working...