delete record from subform

G

Guest

hi,

I have create a form with a subform.
I has also create a delete record button to delete the record on the form.
However this doesnot delete records in the subform (which may contain
multiple records related to the record in the main form). Can anyone please
help me with this

Many thanks
 
G

Guest

Make sure you have a relationship defined in your relationships window
between the main form data and the subform data. Right click on the line that
joins them and click edit relationship. Select Enforce referential integrity
and also select cascade updates and cascade deletes. This means when you
delete a main record, all the subform records related to it will also be
deleted.
 

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

Top