Don't count duplicates

  • Thread starter Thread starter iamnu
  • Start date Start date
I

iamnu

I have a NameField that has duplicates. I want to include a total of
the names on my report, but only count the duplicates once. For
example:
Bill
Bill
John
John
John
Total Names = 2

Can someone explain how to do this?
 
Add a group footer based on NameField
Add a control to the group footer
== Control name: txtCountNames
== Control source: =1
== Running Sum: Over All
Set the group footer's visible property to NO (unless you have other things in
the footer that you do want to show) then set the txtCountNames visible
property to no.

Add a control to the report footer
== Control Name: txtFinalCount
== Control Source: = [txtCountNames]

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Add a group footer based on NameField
Add a control to the group footer
== Control name: txtCountNames
== Control source: =1
== Running Sum: Over All
Set the group footer's visible property to NO (unless you have other things in
the footer that you do want to show) then set the txtCountNames visible
property to no.

Add a control to the report footer
== Control Name: txtFinalCount
== Control Source: = [txtCountNames]

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I have a NameField that has duplicates.  I want to include a total of
the names on my report, but only count the duplicates once.  For
example:
Bill
Bill
John
John
John
Total Names = 2
Can someone explain how to do this?

Excellent instructions, John!
Thank you very much.
 
John Spencer: Thank you so much for your answer to my questions yesterday...I
got the checked boxes to total on check marks only. Greatly appreciate your
help and support with this. Now I'm having a problem with counting duplicate
Job Title Names as listed below. I did try the equations/expressions and it
did not work for me. I also tried DCount and ECount. HELP!!!!! II'm very
very very new to Access, and I'm not sure as to what I did wrong. Below is an
example of the report results:


Vendor Name Candidates 6 #Int 3

# Positions 6 (s/b 1) #Hired 0
_________________________________________________________

Date Last Name First Name Job Title Req # Mgr
Int'd
6/7/09 Green Sam Financial Analyst 00-021 Name
Ck bx ...
8/19/09 Smith John Financial Analyst 00-021 Name
Ck bx ...
9/25/09 Sullivan Cheryl Financial Analyst 00-021 Name
Ck bx ...

Help!!!!
Evelyn
 
You did not answer my question. Are you sorting or grouping by Job Title?

If you are use the Sorting and Grouping Dialog (View: Sorting and Grouping
....) and set up a new group on Job Title. Show Header

Add a control to the group Header
== Control name: txtCountTitles
== Control source: =1
== Running Sum: Over All
Set the group Header's visible property to NO (unless you have other things in
the header that you do want to show) then set the txtCountTitles visible
property to no.

Add a control to the report footer (assuming that is where you want the unique
count)
== Control Name: txtFinalCount
== Control Source: = [txtCountTitles]



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top