Stuart has attended:
Access Intermediate course
Access Advanced course
Access VBA course
Access 2010
I have a form with a delete button that refers to 2 tables.
When I delete I want to delete info from both tables.
Please advise.
RE: Access 2010
Hello Stuart,
Thank you for your question regarding adding a delete button which removes the records from both your tables.
Since ID fields in both tables are a match then you must have a primary key field in both tables. First remove any relationships you already have then save and close the relationship window.
Open the table which does not have a primary key and assign the PK to the ID field (Ref) then save and close the table.
Re-open the Relationships window and drag the Ref field across to the Ref field in the other table. Check the 'Enforce Referential Integrity' box and also check 'Cascade Delete Related Records'.
Enter sample data and test.
I hope this resolves your question. If it has, please mark this question as resolved.
If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?
Have a great day.
Regards,
Rodney
Microsoft Office Specialist Trainer