Delete duplicate in a related table

Denzel

New member
Local time
Yesterday, 23:41
Joined
Dec 12, 2004
Messages
7
Hello,
I have two related table: table_Company and table_contact. Now i have:
Table_Contact Table_Company
James Bolton -----------> MacDonalds
Hellen Kidman ----------> MacDonalds
Now, i wanna have one "MacDonalds" in my Company table, and delete the others "MacDonalds" and still have the relationship between my contacts and their company.
 
Contacts

You need a table for the Companies and another one for the Contacts and link them on a key field in a one-to-many relationship. Meaning one Company can have many related records (Contacts) in the second table.

Make a form for the Companies table and a subform for the Contacts.
Set the link child/masterfields and there you go.

If you don't have many records at this time you may want to move your Contacts to the right Company manually and then delete the Companies that have no related records in the Contacts table.
In the Relationship window you can set referential integrity, so you won't delete a Company that still has related records in the other table.
 
If you don't have many records at this time you may want to move your Contacts to the right Company manually and then delete the Companies that have no related records in the Contacts table.
Thank you.
I have many records, i don't wanna move it to the right company manually.
A solution ?
 
Records

I really can't give good advice about how to do this.
Hopefully someone else can.

You can do some searches in this forum.
 

Users who are viewing this thread

Back
Top Bottom