Count records on a report

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

Guest

I would like help on counting of unique records on a report. If there are
multiple occurences of any record in a particular field, it must only be
counted once.

Thx
 
Create a group Header on the field you want to count once only. You can set
the section's Visible property to No so it does not print. In these section,
place a text box with these properties:
Control Source =1
Running Sum Over All
Format General Number
Name txtCountRS

Now in the Report Footer, place a text box and set its Control Source to:
=[txtCountRS]

This works because the first text box has the value 1 every time it occurs,
and collects a running sum. Summing 1 every occurance is the same as getting
a count of occurrances.
 
thanks for your support.

I have tried it and it has not worked. Maybe you have not understood my
problem.

The report has so many fields and I would like to count the records of a
particular field based on the unique occurences of a record. For example, if
field named "Buyer" has 3 and 6 occurences of "John" and "Mary" respectively
among others, I would like for only a occurence of all buyers to be counted,
i.e john and mary should be counted only once.

Hope this will make things a lot more clearer.

Al

Allen Browne said:
Create a group Header on the field you want to count once only. You can set
the section's Visible property to No so it does not print. In these section,
place a text box with these properties:
Control Source =1
Running Sum Over All
Format General Number
Name txtCountRS

Now in the Report Footer, place a text box and set its Control Source to:
=[txtCountRS]

This works because the first text box has the value 1 every time it occurs,
and collects a running sum. Summing 1 every occurance is the same as getting
a count of occurrances.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Alylia said:
I would like help on counting of unique records on a report. If there are
multiple occurences of any record in a particular field, it must only be
counted once.

Thx
 
Creating a Group Header on the Buyer field, with a running sum text box of
=1 will give you the count.

You could

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Alylia said:
thanks for your support.

I have tried it and it has not worked. Maybe you have not understood my
problem.

The report has so many fields and I would like to count the records of a
particular field based on the unique occurences of a record. For example,
if
field named "Buyer" has 3 and 6 occurences of "John" and "Mary"
respectively
among others, I would like for only a occurence of all buyers to be
counted,
i.e john and mary should be counted only once.

Hope this will make things a lot more clearer.

Al

Allen Browne said:
Create a group Header on the field you want to count once only. You can
set
the section's Visible property to No so it does not print. In these
section,
place a text box with these properties:
Control Source =1
Running Sum Over All
Format General Number
Name txtCountRS

Now in the Report Footer, place a text box and set its Control Source to:
=[txtCountRS]

This works because the first text box has the value 1 every time it
occurs,
and collects a running sum. Summing 1 every occurance is the same as
getting
a count of occurrances.

Alylia said:
I would like help on counting of unique records on a report. If there
are
multiple occurences of any record in a particular field, it must only
be
counted once.
 
the latest suggestion has not worked

Allen Browne said:
Creating a Group Header on the Buyer field, with a running sum text box of
=1 will give you the count.

You could

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Alylia said:
thanks for your support.

I have tried it and it has not worked. Maybe you have not understood my
problem.

The report has so many fields and I would like to count the records of a
particular field based on the unique occurences of a record. For example,
if
field named "Buyer" has 3 and 6 occurences of "John" and "Mary"
respectively
among others, I would like for only a occurence of all buyers to be
counted,
i.e john and mary should be counted only once.

Hope this will make things a lot more clearer.

Al

Allen Browne said:
Create a group Header on the field you want to count once only. You can
set
the section's Visible property to No so it does not print. In these
section,
place a text box with these properties:
Control Source =1
Running Sum Over All
Format General Number
Name txtCountRS

Now in the Report Footer, place a text box and set its Control Source to:
=[txtCountRS]

This works because the first text box has the value 1 every time it
occurs,
and collects a running sum. Summing 1 every occurance is the same as
getting
a count of occurrances.

I would like help on counting of unique records on a report. If there
are
multiple occurences of any record in a particular field, it must only
be
counted once.
 
Back
Top