Sep 14, 2006 #1 Dickx Technical User Aug 24, 2001 33 US Access has a query function to find duplicate records in a table, but is it possible to automatically delete the 2nd occurance of duplicates ?
Access has a query function to find duplicate records in a table, but is it possible to automatically delete the 2nd occurance of duplicates ?
Sep 14, 2006 #2 AlexCuse Programmer Apr 13, 2006 5,416 US Provided you have an autonumber field as your ID this should work: DELETE From TblX WHERE TblX.ID not in (SELECT MIN(ID) from TblX group by Field1, Field2, Field3...) in query designer you can place the where clause (starting with not in) in the criteria field under 'ID' You could always add the unique ID field, delete your dupes, and then remove it. HTH, Alex It's a magical time of year in Philadelphia. Eagles training camp marks the end of another brutal season of complaining about the Phillies. Upvote 0 Downvote
Provided you have an autonumber field as your ID this should work: DELETE From TblX WHERE TblX.ID not in (SELECT MIN(ID) from TblX group by Field1, Field2, Field3...) in query designer you can place the where clause (starting with not in) in the criteria field under 'ID' You could always add the unique ID field, delete your dupes, and then remove it. HTH, Alex It's a magical time of year in Philadelphia. Eagles training camp marks the end of another brutal season of complaining about the Phillies.