I am currently using the following expression which takes the entered date of Birth from the Date of Birth field and then populates the Age field with the persons age. Now I need to add the addition of populating a Year of Birth field with the year of birth.
Your suggestions on the proper code would be greatly appreaciated.
Thanks.
Private Sub DOB_BeforeUpdate(Cancel As Integer)
[Age] = DateDiff("yyyy", [DOB], Now()) + Int(Format(Now(), "mmdd"
< Format([DOB], "mmdd"
)
End Sub
Your suggestions on the proper code would be greatly appreaciated.
Thanks.
Private Sub DOB_BeforeUpdate(Cancel As Integer)
[Age] = DateDiff("yyyy", [DOB], Now()) + Int(Format(Now(), "mmdd"
End Sub