Repost.. Using Just Yearear in criteria for Long Date Field

  • Thread starter Thread starter Noel
  • Start date Start date
N

Noel

I first posted this in Getting Started by mistake. Sorry

Hi. I want to be able to select a set of records, in a
query, by saying "give me all the records that have the
year 2003 in the date in this field". The field specified
is a Date/Time field, set to Long Date in the Table. What
would the queries criteria look like? Also, if this is
possible, what would the criteria look like if I wanted
to specify the year by using a DLookup like

=DLookUp("[PlacementStartYear]","[tblPlacementStartYear]")

Thanks, Noel
 
I first posted this in Getting Started by mistake. Sorry

Hi. I want to be able to select a set of records, in a
query, by saying "give me all the records that have the
year 2003 in the date in this field". The field specified
is a Date/Time field, set to Long Date in the Table. What
would the queries criteria look like? Also, if this is
possible, what would the criteria look like if I wanted
to specify the year by using a DLookup like

=DLookUp("[PlacementStartYear]","[tblPlacementStartYear]")

Thanks, Noel
In a new query column...

Exp:Year([DateField])
Criteria for this field
[Enter the year wanted]

It will prompt you to enter just the year.

Your DLookUp will work as criteria.
If there were more than one record in the table, you would need to add
a where clause to get the correct record.
Since I have no idea what's in the table or how you intend to select
which year you wanted, I can't give you any more help with that.
 
Thanks for this. Cheers, Noel
-----Original Message-----
I first posted this in Getting Started by mistake. Sorry

Hi. I want to be able to select a set of records, in a
query, by saying "give me all the records that have the
year 2003 in the date in this field". The field specified
is a Date/Time field, set to Long Date in the Table. What
would the queries criteria look like? Also, if this is
possible, what would the criteria look like if I wanted
to specify the year by using a DLookup like

=DLookUp ("[PlacementStartYear]","[tblPlacementStartYear]")

Thanks, Noel
In a new query column...

Exp:Year([DateField])
Criteria for this field
[Enter the year wanted]

It will prompt you to enter just the year.

Your DLookUp will work as criteria.
If there were more than one record in the table, you would need to add
a where clause to get the correct record.
Since I have no idea what's in the table or how you intend to select
which year you wanted, I can't give you any more help with that.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top