Re: Seperating duplicating records

message from Michael J. Strickland on 04 Jun 2004
If I understand what you want, here is a procedure to make a new table
of records with unique PatientIDs using their earliest date.

1. First make a backup of the table.

2. Copy the original table (Table1)'s structure (structure only) to a new
table (Table2).

3. Set the Patient ID in this table as a primary key (in Design View,
Edit->Primary Key).

4. Go back and sort the original table (Table1) on the date field (click on
Date column header, choose ascending).

5. Copy all the records from this table (Table1) into Table2.
(highlight upper left corner of Table1, Ctl-C, minimize Table1, Open
Table2,highlight upper left corner, Ctl-V) .

6. As the copy progresses you should get a message that it could not copy
all records because of key viloations. Answer the following prompts as
indicated below.

The Changes you requested ... : Click Ok
Do you want to supress ...: Click Yes
You are about to paste ... : Click Yes
Records that Microsoft Access were unable ...: Click OK/

This will prevent copying records with duplicate Patient ID fields.

Your result (Table2) should be a table of records with unique Patient IDs,
sorted by date.
 

Archived message: Re: Seperating duplicating records (MS Access)