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

Counting records in a report 5

Status
Not open for further replies.

dawnd3

Instructor
Jul 1, 2001
1,153
0
0
US
I recently was having trouble counting records in a report. I was trying to count the number of students in a report that was grouped by school. However, I was having issues because sometimes the students were listed multiple times in the grouping. (they could have more than one item in the detail section and the database isn't perfectly normalized.) Anyway, I tried DCount but it didn't work in all instances that I needed it to so I wanted to share how I actually got the count I needed, in case you ever need another option.

I put an unbound field in the student id header and set the control source to =1. I named this field [fldCount] and set the running sum property to "over group". I then put another control in the school id footer and made the control source =[fldCount]. That is all there is too it. To get the total for the whole report, I did the same thing except set the running sum property to "over all".

There may have been other, better ways to do this, but this is what worked for me and I just thought I would share in case it ever helps out someone else.

Take Care,

Dawn

 
Excellent Tip!! I was looking for something similar which would give a running count (or total), of a report's control value. We went through all types of code scenarios, but in the end it looks like your idea works the best. You get a star from me.

Thanks for the very useful tip!!
 
Thanks! i was having problems with this too and you saved me!
STAR!!
 
That is what I need to do, but I am a newbie at this. Where do you set the "running sum property"?

Thanks!
 
running sum is on the "data" tab in the properties box of the feild you create. Just click on the field, right click and choose "properites".

Dawn

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top