Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access DOB/date convert to age

Status
Not open for further replies.

MIKERYAN

Programmer
Jul 13, 2000
9
US
First my skills may be overstated. Tech/user might be my speed. I added a field to current database for age with a formula =(Now()-[client DOB])/365.25. with format to 0 decimal Works but will not enter data to table only shows on form.
 
Mike, if you have the date and know how to make the calculation, why do you want to save it to the table? This is considered a calculated field and is usually considered bad practice to save it to the table. I think you are doing fine the way you have it on the form... If you MUST save it, let us know and we can help you through it... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Thanks for the response. Yes normaly I would not need to record age data however I am in need to convert those DOB to age to upload data to other depts for stats. They need to group ages for testing we perform
 
Okay, I guess. Then I would add the field to your table and then create and run an update query:

UPDATE MyTable
SET MyTable.Age = (DATE()-[MyTable].[client DOB])/365.25;

You will just have to change the table and field names. Hope that helps... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Thanks THoey
I am going to heed to your caution and try to add the formula to analyzed excell data before sending. Just an extra step.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top