Working out ages from DOB.

  • Follow


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!
0
Reply Utf 9/13/2007 1:30:00 PM

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

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"mike@work" <mikework@discussions.microsoft.com> wrote in message
news:5F7172E6-F11B-4B4E-B033-E202190EA5B3@microsoft.com...
>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! 

0
Reply Allen 9/13/2007 1:41:30 PM


1 Replies
317 Views

(page loaded in 0.051 seconds)

Similiar Articles:
















7/29/2012 6:26:09 PM


Reply: