I have a form (Form1) and a subform (Form2) bound to tables Table1, Table2 with a delete button. Both form and subform is linked with master/child fields.
I have selected the fields on form to populate a record from Table1 and When i click on delete button
1. If there is any record in Table2 that is bound to record of Table1, those gets populated in subform Form2 and the error message "The changes you requested to the table were not successful..." is thrown.
2. If there is no record in Table2 that is bound to record of Table1, then the record in Table1 is getting deleted without any issues.
I think the cascade delete is not happening. Can any one of you tell me on how to resolve this issue?. Thanks.
The below is the code for delete button:
On Error GoTo Err_btnDel_Click