Count ONLY once

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a report which includes both people and events. All people have
events and all events have people (field name PeopleID), but some people have
more than one event. In the report footer, I want a field that counts the
people only ONCE... regardless of the number of events associated with that
person.

Help?
 
Create a query that counts people at events, but leave the event information
out and Unique Values in the query to Yes. This should return a list of
individual people listed only once. Then in the report footer, use the DCount
function to count the records in this query and put it in a textbox.

Barry
 
NC_Sue said:
I've got a report which includes both people and events. All people have
events and all events have people (field name PeopleID), but some people have
more than one event. In the report footer, I want a field that counts the
people only ONCE... regardless of the number of events associated with that
person.


Add a text box txtCount to the person group header section.
Set its ControlSource expression to =1 and its RunningSum
property to Over All.

Then, the report footer section text box can display the
number of people by using the expression =txtCount.
 
At first I thought we were on the right track, but what happened was that it
counted people more than once (if their names appeared more than once).

Example - I may have only 40 people, but 10 of them appear in the list 2 or
3 times, thus the total count is winding up to be 55.
 
NC_Sue said:
At first I thought we were on the right track, but what happened was that it
counted people more than once (if their names appeared more than once).

Example - I may have only 40 people, but 10 of them appear in the list 2 or
3 times, thus the total count is winding up to be 55.


It sounds like you put the running sum text box in the
detail section instead of the person GROUP HEADER section.
In you don't have a group header section, greate a group
(View menu) on the person field and make the header section
invisible.

I think your report will look better if you display the
group header and move the person field from the detail
section to the group header section.
 
Back
Top