Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove duplicates ?

Status
Not open for further replies.

dphan

Technical User
Jul 30, 2003
6
0
0
US
Is there a way to remove duplicate records in access w/o manually pasting with the "structure only" option ?

I need to automatically detect and remove duplicate records everytime a report is opened.

Thank you all in advance. =]
 
What I do use the Find Duplicates Query Wizard to create a query. Then change the query type to a delete query. Then I run this query before running the report.
 
I have tried using the Find Duplicate query. I have gotten the results.

How do i change the query type in code? I want the report to automatically remove the duplicates. Plus, when i manually changed the type into delete query, and ran it, it deleted everything in my table.
 
have you tried adding the word "distinct" to your original select statement that generates the query?

i.e. Select distinct [ID] from.....

To make this change, open your query in design view, go to View, SQL View and change it there.

hope this helps.
 
dphan
this may help. i find that locating and deleting duplicates is more of a process than just a click. i use a modified "find duplicates Query" along with a form i created to show the possible duplicates then use a double-click on the box in form with code to search the table and bring up only the duplicates then decide which to delete ...manually....the main problem i see with Auto-deleting anything is that, if for some reason the program has a problem u may delete data that u really wanted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top