Retrieve DCount Statement (Duplicate Name) (1 Viewer)

lhooker

Registered User.
Local time
Today, 16:56
Joined
Dec 30, 2005
Messages
399
The below DCount statement gives me the number of duplicates records from the "Query_Find_Duplicates_For_Gift_Totals" query. How can I get the names of the
duplicate records from the below DCount statement?

DCount(" Gift_Totals.[Survey_Taker_Last_Name]", "Query_Find_Duplicates_For_Gift_Totals")
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 13:56
Joined
Aug 30, 2003
Messages
36,126
You can't get anything other than the count from the DCount(). Perhaps base a form/subform/report on the query?
 

plog

Banishment Pending
Local time
Today, 15:56
Joined
May 11, 2011
Messages
11,646
Presumably from the query itself. But....what's the big picture?

Once you have these names (which you already do), what are you going to do with them? What's the ultimate aim? With that we can help you get to where you want to be.
 

ebs17

Well-known member
Local time
Today, 22:56
Joined
Feb 7, 2020
Messages
1,946
The below DCount statement gives me the number of duplicates records from the "Query_Find_Duplicates_For_Gift_Totals" query
That's wrong. The DCOUNT simply counts the records in which the designated field has content, and it only returns a corresponding number.

For higher quality expectations, you have to formulate a query. Combination of two fields as a criterion for duplicate:
SQL:
SELECT Key1, Key2, COUNT(*) AS Occurence
FROM TableX
GROUP BY Key1, Key2
HAVING COUNT(*) > 1
 

Users who are viewing this thread

Top Bottom