Access stores dates in the form of the number of days since 31 December 1899. So if you subtract two dates, you get the number of days between them.
You can calculate age using a little custom function. Copy the following code to a standard module:
Function Age(Date1, Date2) As Integer
‘ Returns the Age in years between 2 dates
‘ Doesn’t handle negative date ranges i.e. Date1 > Date2
Age = Year(Date2) – Year(Date1)
If Month(Date2) < Month(Date1) Or (Month(Date2) = Month(Date1) And Day(Date2) < Day(Date1)) Then
Age = Age – 1
End If
End Function
Use this function in a query to define a calculated field:
TheAge: Age([Date of birth], [Start of Year])
or as control source of a text box on a form or report:
=Age([Date of birth], [Start of Year])