Hello.
I'm trying to add in a counter within my userform but the results does not seem to appear within the placeholders i have.
What this should be doing is, it calculates the age of the person, then count how many within that age group appears.
Here's the code for one of the fields...
Private Sub frmP1DOB_AfterUpdate()
Dim frmAge0to5 As Long
Dim frmAge6to12 As Long
Dim frmAge13to17 As Long
frmP1Age = DateDiff("y", frmP1DOB, Date) / 365
frmP1Age = Format(frmP1Age, "0")
If frmP1Age <= 5 Then
frmAge0to5 = frmAge0to5 + 1
Else
If frmP1Age >= 6 And frmP1Age <= 12 Then
frmAge6to12 = frmAge6to12 + 1
Else
If frmP1Age >= 13 And frmP1Age <= 17 Then
frmAge13to17 = frmAge13to17 + 1
Else
End If
End If
End If
End Sub
Any help would be wonderful and thanks for taking the time to look at this!
-Steve