Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Year Question

Status
Not open for further replies.

LMRollins

MIS
Nov 14, 2000
120
US
I want to be able to show only the last 2 years of info in my database. I know I can go into the query and tell it to show only >=2003 but I need to make it automated so that I don't have to change it every year. Does anyone of a formula that I can use that will do this?

Lori
 
>=Year(Date())-1

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Lori
In your query, create a new column with the expression
Year([YourDateField])

Then put in criteria in the same column
>=Year(Date())-2

Tom
 
Lori
Sorry. My criteria should have been
>=Year(Date())-1

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top