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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Current Year??

Status
Not open for further replies.

Jelloshot1

Technical User
Aug 5, 2001
20
0
0
US
Hi all,

In my database (Access 97) there is a table for employee sick time used.
I was wondering if there is a way to filter records in a form and report to show only those with a date in the current year?
I've tried using **/**/01 in the criteria line of the query that runs the form. It works ok, but will have to be changed there, and anywhere else I use it, when the year changes. I really don't want to go through all that! I was hoping it could be automated somehow.

Any suggestions would be appreciated.
Mary....JelloShot :p
 
Hi!

Try using this criteria:

Year(DateField) = Year(Date)

Naturally you will need to substitute the name of your field for DateField.

hth
Jeff Bridgham
 
Hi Jeff,

I tried your suggestion. It didn't quite work but it put me on the right track. What I ended up with was

DatePart("yyyy",[DateField]= Year(Now))

Thanks for the help!
Mary :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top