I am trying to get a count of the number of duplicate records from a table based on three fields, Fname, Lname, and socsec number. I have this query but it isn't working.
Can you tell me the proper syntax to get a result and possible "clean up" my logic?
WHERE (((TPatient.FirstName) In (SELECT [FirstName] FROM [TPatient] As Tmp GROUP BY [FirstName],[LastName],[SocSec] HAVING Count(*)>1 And [LastName] = [TPatient].[LastName] And [SocSec] = [TPatient].[SocSec])));