Ms-access – Access query to select multiple records with matching field

ms access

I have a table with a list of people ([FirstName], [Surname], [Age]). Some of these people are in the same family. I'd like to return a list of people who have another family member in the table (same surname). However I'd like to exclude records that have no other records with the same surname. Whats the best way to do this in MS Access

Best Answer

Select [FirstName], [Surname], [Age]
From People
Where DCount("Surname", "People", "Surname='" & SurName & "'") > 1

OR

Select P.*
From (Select Surname From People Group by Surname Having Count(*) > 1) AS G
JOIN People AS P ON P.Surname = G.Surname