I'm using the following code to compute Age based on Date of Birth. (i'm using 4 digit year)
Private Sub DOB_AfterUpdate()
Age.Value = DatePart("yyyy",[Now]) - DatePart("yyyy",[DOB])
End Sub
I'm getting bad results and realize I need to use month and day in the calculation.
Any ideas how?
Thanks!
Private Sub DOB_AfterUpdate()
Age.Value = DatePart("yyyy",[Now]) - DatePart("yyyy",[DOB])
End Sub
I'm getting bad results and realize I need to use month and day in the calculation.
Any ideas how?
Thanks!