Discussion Locked

Date Figuring in Access

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Ok, I have got a complex form, with a field call DOB. And I have added
unbound textbox and named the label Age and now I want to use a Expression
or Event Procedure to update and fill in the age when I type in the DOB. Is this the way to do
it oris there a better way to go about this?

Joshua Miller

5 replies

by highlander718

Go to the unbound text box properties (in design view) and use Control Source to edit your formula using the other (date) field from the form. Something like :

= (year) - year([text1]) obviously a little more complicated but I hope that's something you can figure out.

by chainsawz

Type this in the control source of your unbound textbox 'Age': =(Now()-[DOB])/365.25
Dividing by 365.25 accounts for leap years.

Hope this helps!

This discussion is closed to new replies.