Deleting subform data when main form is deleted

jsbarroso

Registered User.
Local time
Today, 04:03
Joined
May 3, 2013
Messages
49
I have a main form with several linked by ID worksheet sub-forms. I would like to add a on-click function to delete the main form and all related record on each sub-form. I have tried several methods but nothing is working correctly. The cascading delete function is not available as part of the form relationships. Any idea how I can accomplish this?:banghead:
 
I moved your thread out of the moderated sample databases forum. Cascade delete would be set in the Relationships window, not in the form. If you wanted to accomplish it manually, you'd get the primary key from the main form, run delete queries on the child tables using it as a criteria, then delete the main form record.
 

Users who are viewing this thread

Back
Top Bottom