Discussion Locked

Microsoft Access 2000

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have developed a database but in that dbase there are two fields one is date of birth and the other is age. My questions is how do I get the date of birth to automatically update the age field ?

5 replies

by dklippert

Calculated fields should not be included in Tables. Base your report on a Query and use something like (Date()-[BirthDate])/365

by brent.brewer

Since the age changes as time goes on, it would be better to not store the age in the table but set a text field to have the Control Source =Int((Date()-[Birthdate])/365). you would also use this in your reports. Make sure you have the '=' sign in front of the equation. This will allow it to show current age on the report and in the form.

Alternate way to get same result
=Int((DateDiff("d",[Birthdate],Date()))/365)

This discussion is closed to new replies.