In spite of our best efforts to store data efficiently in databases, errors happen that result in duplication of information. Sometimes data—which may or may not be accurate—is imported from other sources. Some departments may be using databases that were poorly designed years ago, but users have continued to enter data into them anyway. And, of course, humans make data entry errors. When it is time to clean up the data, the Find Duplicates Query Wizard can help with that task.
Finding Duplicate Records
In our database, tblStudents holds some records that have been entered over time and came from multiple sources. The possibility exists that some students may have been accidentally entered multiple times. If the primary key is entered incorrectly and doesn't match a primary key already in the table, then Access won't prevent that data from being entered. This is true of data we append from other sources or data directly entered into the database.
We will use the Find Duplicates Query Wizard to search for duplicate records in
Step1. To activate the Create tab, on the Ribbon,
Click the Create tab
Step2. To begin building the Find Duplicates query, in the Queries group,
Step3. To indicate that we want to create a Find Duplicates query,
Double-Click Find Duplicates Query Wizard
Step4. To choose the table for our search,
scroll down and Click Table: tblStudents
NOTE: We could view names for queries or for tables and queries by clicking the appropriate radio button.
Step5. To move to the next step in the wizard,
Step6. To select the fields with possible duplicated information,
Double-Click last_name, Double-Click first_name
Step7. To move to the next step of the wizard,
Step8. To choose other fields for the query display,
Double-Click email, local_phone, and local_address
Step9. To move to the next step of the wizard,
Step10. To name the query and complete the wizard, in the Name field, type:
Step11. Close the query.