DateDiff function will not work in ACCESS query

I want to get the age of a person and I tried using DateDiff("yyyy", DOB, Date()) and all I get is error that the function is not recognized.  I have done this before, but just do not know why it will not work now??  This is an ACCESS 2013 database and I am about ready to take the computer and throw it out the window.
Sandra SmithRetiredAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Najam UddinCommented:
try changing Date() to today() or Now
Sandra SmithRetiredAuthor Commented:
DID THAT.
Sandra SmithRetiredAuthor Commented:
It is like it is not recognizing any functions as I get the same error when I try Date(), Now() or whatever.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Dale FyeOwner, Developing Solutions LLCCommented:
DateDiff is not going to work for age.  For example,

DateDiff("yyyy", #12/31/14#, #1/1/15#) = 1

So you need something a little more distinct, try:

?DateDiff("yyyy", DOB, Date()) + (Format(Date(), "mmdd")  < (Format(DOB, "mmdd")))

This way, you determine the difference in the Year( ) portion of the two dates, and then check to see whether the current Date (mmdd) < the DOB (mmdd).
Dale FyeOwner, Developing Solutions LLCCommented:
can you post your SQL?

Just out of interest, what version of Office are you using?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Your syntax works on my machine (2013), so I would assume there's something else going on.

Check your references, make sure none are marked MISSING.

Close/reopen Access.

Reboot your machine.

Compile the database, and fix any errors.

Make sure your Windows and Office installations are fully up to date.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sandra SmithRetiredAuthor Commented:
Thanks, this will do.  There was no SQL, it was simply using the DateDiff function, which kept throwing an error.  It worked in the Immediate window and all references were there.  But this has solved my issue.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.