deleting related records at once

  • Thread starter Thread starter mhmaid
  • Start date Start date
M

mhmaid

I have two related tables
Expense reports
expense details

with one linking key ExpenseReportid
suppose i want to delete one record from the first table , together with the
related record/s from the other table. how this can be done.
thanks
 
You've described "how" you are trying to do something ('delete record plus
related records').

Now, how about if you describe "what" ... as in what will deleting these
records allow you to do? It may be that it is unnecessary to delete
anything?!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
IF you have set up relationships in the relationships window between the
two tables, you should be able to click on the relationship line and set
Cascade deletes on. That will automatically delete the related many
side (Expense Details) records when the one side (Expense Reports)
record is deleted.



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 

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