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
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