Discussion Locked
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 mair
Poster rated this answer
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)
by mair
Poster rated this answer
by mair
This question was closed by the author
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
1 helpful
9 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
0 helpful
3 replies
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies
Discussion Locked
Best Ways to Improve Website Visibility
0 helpful
5 replies