-
Open the Access database and select the table that contains the date of birth field. -
In the table design view, ensure that there is a date of birth field. -
Add a new calculation field (which can be of text or numeric type) to store the calculated age value. -
In the property pane of the calculated field, set the Data Type to text or numeric value, and select according to your preference. -
In the properties pane of the calculated field, locate the Default Value property. -
In the Default Value attribute box, enter the following expression to calculate age: Copy Code =DateDiff( "yyyy" , [BirthDate], Date ()) The above expression uses DateDiff Function to calculate the value from [BirthDate] The difference in the number of years between the field (date of birth) and the current date. -
Save design changes to the table.