You have your parenthises off. DateDiff("yyyy",[DOB],Date()))- There
are three closing and only one opening. My bad!
Rick B
Steve said:
DateDiff("yyyy",[DOB],Date()))-Iif(Format([DOB],"mmdd")>Format(Date(),"mmdd"
),1,0)
i put it exactly like this as the field is DOB
Thanks
Steve
:
Copy and paste what you have typed and post it.
ok, i have tried putting that as criteria, but it says: The
expression
you
have entered is missing a closing parenthesis, bracket (]), or vertical
bar
(|)
any ideas
Thanks
Steve
:
Yes, replace [DOB] with your field's name.
hi Rick,
is there any way for it to work by getting the DOB from a table?
Thanks
Steve
:
DateDiff("yyyy",[DOB],Date()))-Iif(Format([DOB],"mmdd")>Format(Date(),"mmdd"
),1,0)
Hope that helps.
Rick
hi,
does anyone know how do i use a query in access to work out
someones
age
from their data of birth?
Thanks
Steve