Birth Date Calculator

C

CEV

I have a form that has a textbox for the Date of Birth for people. This
textbox is linked to a field in a table. I want to add another textbox on
this form that is not linked to any table. I want this textbox to display
the current age of people based on the date of birth from the other textbox.
What formula do I put into this new textbox?

Thanks,

Chad
 
G

Guest

Hi Chad

Use this

=DateDiff("yyyy",[DateOfBirth],Date())-IIf(Format([DateOfBirth],"mmdd")>Format(Date(),"mmdd"),1,0)

DateOfBirth is the field name where the date of birth is stored.
 
C

CEV

Thanks Wayne. Worked perfect!!

Chad


Wayne-I-M said:
Hi Chad

Use this

=DateDiff("yyyy",[DateOfBirth],Date())-IIf(Format([DateOfBirth],"mmdd")>Format(Date(),"mmdd"),1,0)

DateOfBirth is the field name where the date of birth is stored.

--
Wayne
Manchester, England.
Enjoy whatever it is you do


CEV said:
I have a form that has a textbox for the Date of Birth for people. This
textbox is linked to a field in a table. I want to add another textbox on
this form that is not linked to any table. I want this textbox to display
the current age of people based on the date of birth from the other
textbox.
What formula do I put into this new textbox?

Thanks,

Chad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top