L
leaf
Hi there,
I have 3 fields in a Table_age55. When I am in the
form_age55, after I enter date of birth (DOB), I would
like to have age and agecat automatically calculated and
show up in the form_age55 and have values entered into the
table_age55. The following codes were used and they are
not working properly. Please help again.
Thanks,
Leaf
Private Sub DOB_AfterUpdate()
Age = DateDiff("yyyy", DOB, DateofPhoneScreen)
Select Case Age
Case Is < 40
AgeCat = "<40"
Case 40 To 55
AgeCat = "40 to 54"
Case Is >= 55
AgeCat = ">=55"
End Select
End Sub
I have 3 fields in a Table_age55. When I am in the
form_age55, after I enter date of birth (DOB), I would
like to have age and agecat automatically calculated and
show up in the form_age55 and have values entered into the
table_age55. The following codes were used and they are
not working properly. Please help again.
Thanks,
Leaf
Private Sub DOB_AfterUpdate()
Age = DateDiff("yyyy", DOB, DateofPhoneScreen)
Select Case Age
Case Is < 40
AgeCat = "<40"
Case 40 To 55
AgeCat = "40 to 54"
Case Is >= 55
AgeCat = ">=55"
End Select
End Sub