After creating the query with the Find Duplicates Query Wizard, you might want to modify the query design to produce different query results by adding fields, removing fields, or deleting duplicate records.
Add or remove fields
Add a field
In a query, you add only those fields whose data you want to view, set criteria on, group by, update, or sort. In a filter, you add only the fields you want to use for sorting or specifying criteria, and Microsoft Access will automatically display all the fields in the filtered results.
How?
To select | Do this |
---|---|
A field | Click the field name. |
A block of fields | Click the first field in the block, hold down SHIFT, and click the last field. |
Noncontiguous fields | Hold down CTRL as you click the fields. |
All fields | Double-click the title bar of the field list or click the asterisk (*). |
Tip
Instead of dragging, you can also add fields by double-clicking the name in the field list or selecting a field directly from the list box in the Field row on the grid.
Remove a field
Select the field by clicking its column selector, and then press the DELETE key.
Note When you remove a field from the design grid, you're only removing it from the query or filter's design. You're not deleting the field and its data from the underlying table, nor, in the case of a filter, are you removing it from the filtered results.
You can't convert a Find Duplicates query to a delete query to delete duplicate records. This is because the Find Duplicates query returns the original record and any duplicates of the record so that you can choose which version to delete. Therefore, if you convert it to a delete query, it will delete the original and the duplicates. However, there is a way to automatically delete duplicate records while retaining the originals.
Automatically delete duplicate records
Deleting duplicate records from a table requires two steps. First, you create a copy of the structure of the table that contains duplicates, and then make primary keys of all the fields that contain duplicates. Second, you create and run an append query from the original table to the new table. Because fields that are primary keys can't contain duplicate records, this procedure produces a table without duplicate records.
How?
How?