Back with another question.
I have a form with a subform that also has a subform. Tables in MySQL:
dpr = dpr_id (pk), etc.
dpr_survey = survey_id (pk), dpr_id, etc.
dpr_cr = cr_id (pk), survey_id, etc.
On each of the three forms is a delete button to delete the current record. It works well for the parent record but not the child record(s). I have relationships set up for dpr_survey and dpr_cr but only in the access relationships tool.
Here is the code on my delete button:
What do I need to include to make sure the child records get delete too?
Thanks for any help!
I have a form with a subform that also has a subform. Tables in MySQL:
dpr = dpr_id (pk), etc.
dpr_survey = survey_id (pk), dpr_id, etc.
dpr_cr = cr_id (pk), survey_id, etc.
On each of the three forms is a delete button to delete the current record. It works well for the parent record but not the child record(s). I have relationships set up for dpr_survey and dpr_cr but only in the access relationships tool.
Here is the code on my delete button:
Code:
If MsgBox("Do you wish to delete this record?", vbYesNo, "Delete Confirmation") = vbYes Then
DoCmd.RunCommand acCmdDeleteRecord
End If
Thanks for any help!
Comment