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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to count groups in Report?

Status
Not open for further replies.

Overmyhead2

Programmer
Jun 5, 2000
39
US
I have 133 records. 133 days. Each record has a site, day,data. The report is grouped by site. In the footer I have: count([Site]) . I get 133 sites. There are only 5 sites. I need a distinct count of the sites. Looked in Help docs but unable to find how to do this.
Victoria
 
Not a problem! :)

Use a variable to track the count of sites. Then use the Group_Footer event to iterate the count. Example

Private iSiteCount as Integer

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)

iSiteCount = iSiteCount + 1

End Sub
 
Not sure how to use a varible. Where do you add it to the report. How do I get iSiteCount to show on report? I copied and pasted the code and I assigned a textbox control source to =iSiteCount.. No luck...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top