Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Command Button 1

Status
Not open for further replies.

makala

Technical User
Mar 13, 2003
7
US
I have a delete button on a form. I would like for it to delete the current record and also any corresponding records with this one delete button.

Example:

I want to delete a rack record, when I delete the rack record I also want the corresponding Patch Panel and Circuit records deleted.

How would I go about doing this?
 
Hello Makala,

If you have a relationship set up between the tables based on a common key with delete cascade set to true then it will happen automatically for you.

Hope this helps!
 
Will this work if the corresponding circuit and Patch records are on two different tables. Rack and Patch are on one and Rack and circuit are on another.
 
Yes. In the relationsships window, right click on the line connecting the tables and look at the options. As an example if you had invoice detail lines with a relationship into invoices which in turn had a relationshiop into customers and all of the relationships were set up to Cascade Delete then deleting a customer would automatically delete all of their invoice and invoice detail records as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top