Delete record from multiple tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I want to be able to delete a employee record from 3 different tables. Up to
now I have been opening each table and deleting the records manually but this
is tedious, not to mention dangerous.

Is it possible to have a combo box that lists each employee and will delete
the selected employee record from all 3 tables? I'm open to other methods
that will achieve the same.

My tables are listed below:


Employees ( Table 1 )
-------------------------
Employees_ID ( PK )
Emp_Name


Main ( Table 2 )
-------------------------
Main_ID ( PK )
Employees_ID ( FK )


EmployeeCourses ( Table 3 )
 
if you set up cascading deletes for those primary/foreign key combinations
in the Relationships window, then deleting a record from the Employees table
will automatically delete the related records from the other two tables.

hth
 
Tina,

You were absolutely right about the cascading deletes defined in the
relationships window. Deleting an employee in the employees table also
deleted the same employee record in the other two tables.

Thank you very much for your help with this :-)


tina said:
if you set up cascading deletes for those primary/foreign key combinations
in the Relationships window, then deleting a record from the Employees table
will automatically delete the related records from the other two tables.

hth
 
you're welcome :)


Alias said:
Tina,

You were absolutely right about the cascading deletes defined in the
relationships window. Deleting an employee in the employees table also
deleted the same employee record in the other two tables.

Thank you very much for your help with this :-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top