General discussion

Locked

Date Figuring in Access

By Joshua Miller ·
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

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Date Figuring in Access

by highlander718 In reply to Date Figuring in Access

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.

Collapse -

Date Figuring in Access

by Joshua Miller In reply to Date Figuring in Access

Poster rated this answer

Collapse -

Date Figuring in Access

by chainsawz In reply to Date Figuring in Access

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!

Collapse -

Date Figuring in Access

by Joshua Miller In reply to Date Figuring in Access

Poster rated this answer

Collapse -

Date Figuring in Access

by Joshua Miller In reply to Date Figuring in Access

This question was closed by the author

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Software Forums