Birth Date Calculator

  • Thread starter Thread starter CEV
  • Start date Start date
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
 
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.
 
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
 
Back
Top