Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Count of Subheaders in it's Parent Header Section

Status
Not open for further replies.

DaveInIowa

Programmer
Dec 2, 2003
576
US
Is there any way to get a count of the number of subheaders and place this count in it's associated parent header section? If I use COUNT(*), I get a count of the detail lines. I've also tried creating a dummy txtOne field in the subheader (with Control Source =1) and attempting to display the count as COUNT([txtOne]) but this keeps asking me to enter a parameter value for txtOne.
 
Hi
For what its worth:
Code:
Option Compare Database
Dim CountHdr0
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
CountHdr0 = CountHdr0 + 1
End Sub

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
Me.txtCountHdr = CountHdr0 / 2
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top