access

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Access 2010

Access 2010

resolvedResolved · High Priority · Version 2010

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

Attached files...

CustomerSales.accdb

RE: Access 2010

That's brilliant Rodney,

Thanks so much!


 

Access tip:

Undo Entries In Records

To Undo any entries or changes in records:

Hit the ESC key once for the current field

And ESC twice for current record

View all Access hints and tips


Server loaded in 0.09 secs.