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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting data left in a table

Status
Not open for further replies.

jazzz

Technical User
Feb 17, 2000
433
US
My main form has a popup form which stores data in a primary key field called soldto and this form is based on it's own table. Soldto is where I synx with my main table which has a field also named soldto.  If I delete this record on the pop up it deletes just fine but leaves the soldto number in my main table, all data from the soldto table is gone just fine.  What is the best way to remove that entry from my main table automatically when I delete the data from my pop up form?
 
This is kind of confusing to understand, but I will give you my best guess on what I've just read.<br><br>It sounds almost like the form only deletes from a child table and not from the parent table.&nbsp;&nbsp;If this is the case, you can go into the relationships window and make sure that the relationship between the two tables allows for cascading of updates and deletes.&nbsp;&nbsp;To do this, right click on your relationship (if you have set one up) and then go to EDIT RELATIONSHIP.&nbsp;&nbsp;Click REFERENTIAL INTEGRITY and the two appropriate boxes for the cascades.<br><br>If this doesn't work (or isn't what you were talking about) then you might need to create a form (just for testing purposes) that deletes the record from the PRIMARY table and see if that works.&nbsp;&nbsp;If it does, then try to delete again from the child table and see what happens....
 
BuffDaddy, I like that.... it's not a file being left behind just some data in another table that I want to clean up when I delete the popup.&nbsp;&nbsp;It also stores the value of one field in a different table.&nbsp;&nbsp;I want to delete that data from that field in another table when I delete the file in the pop up.&nbsp;&nbsp;I hope that is clearer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top