i have this report and i want to get the count at the end of page
here is the layout of the report
Id Name Gender
11 test M
22 test1 F
33 test2 M
44 test3 F
At the end of page i want to get a count where is gets the
Males = 2 Female = 2
How can i write a VBA code
rs.Open "Select * from test Where Gender='" & Me!Gen & "' and Id=" & Me!ID & " Order By Gender", SASConnection, adOpenForwardOnly, adLockReadOnly
Do Until rs.EOF = True
If Me!Gen = "F" Then
FCnt = FCnt + 1
Else
If Me!Gen = "M" Then
MCnt = MCnt + 1
End If
End If
rs.MoveNext
Loop
Me.Females1 = FCnt
Me.Males1 = MCnt
rs.Close: Set rs = Nothing
FCnt = 0
MCnt = 0
can someone help me
here is the layout of the report
Id Name Gender
11 test M
22 test1 F
33 test2 M
44 test3 F
At the end of page i want to get a count where is gets the
Males = 2 Female = 2
How can i write a VBA code
rs.Open "Select * from test Where Gender='" & Me!Gen & "' and Id=" & Me!ID & " Order By Gender", SASConnection, adOpenForwardOnly, adLockReadOnly
Do Until rs.EOF = True
If Me!Gen = "F" Then
FCnt = FCnt + 1
Else
If Me!Gen = "M" Then
MCnt = MCnt + 1
End If
End If
rs.MoveNext
Loop
Me.Females1 = FCnt
Me.Males1 = MCnt
rs.Close: Set rs = Nothing
FCnt = 0
MCnt = 0
can someone help me