Get rid of the square brackets around Date() and also reverse the dates as
you will get a negative number if you don't:
=DateDiff("yyyy",[Employee Listing]![Hire Date],Date())

Signature
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
If my post was helpful to you, please rate the post.
__________________________________
> This is the error message I received when I tried to build an expression
> using date parameters. I used:
[quoted text clipped - 5 lines]
> the following error: The object doesn't contain the Automation object
> 'Date().
NewAccessUser - 29 Dec 2007 18:59 GMT
Thank you for the tip. I reversed and did not get the error message,
however, the data did not populate when I ran the report. What am I missing?
> Get rid of the square brackets around Date() and also reverse the dates as
> you will get a negative number if you don't:
[quoted text clipped - 10 lines]
> > the following error: The object doesn't contain the Automation object
> > 'Date().
Linq Adams - 29 Dec 2007 19:03 GMT
This is really identical to calculating a person's age, and as such the
formula
=DateDiff("yyyy",[Employee Listing]![Hire Date],Date())
will often give you false values! The problem is that DateDiff() using the
"yyyy" qualifier calculates the difference between the years in the two dates
supplied.
If you have a person hired on 12/31/2000 and you run this calculation on
1/1/2008 it will show their length of service as 8 years (2008 - 2000) when
actually their length of service is 7 years and 1 day!
For an accurate length of service try:
DateDiff("yyyy", [Employee Listing]![Hire Date], Date) - IIf(Format$(Date,
"mmdd") < Format$([Employee Listing]![Hire Date], "mmdd"), 1, 0)
Linq

Signature
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000/2003