Working out ages from DOB.

G

Guest

i had this code in a select query which ran fine in 2003...

DateDiff("yyyy",[dateofbirth],Now())+Int(Format(Now(),"mmdd")<Format([dateofbirth],"mmdd"))

now in 2007 i'm told.... undefined function "format" in expression.

any help will be much appreciated as i am about to revert to 2003 in despair!
 
A

Allen Browne

For the code to work in Access 2007, you may need to specify that your
database is in a trusted location:
Office Button | Access Options | Trust Center | Trust Center Settings

Alternatively, you may need to solve a problem with your library references:
http://allenbrowne.com/ser-38.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top