Enable cascade delete in Microsoft Access only when every child record must disappear with its parent. If you turn it on in the wrong relationship, one parent delete can erase many related records and make recovery harder. This guide explains how the rule works, when it is safe, and how to prevent accidental child-record loss.
What cascade delete does in Access
Microsoft Access uses relationships to connect a parent table to one or more related tables in a one-to-many relationship. When referential integrity is on, Access checks that the parent record exists before it allows related child rows. Cascade Delete Related Records tells Access to delete those child rows automatically when the parent row is deleted. (Microsoft Learn)
That behavior is tied to the relationship settings in the Relationships window. The parent table holds the primary key, which is the unique record identifier. The child table stores the matching foreign key value, and Access uses that value to decide which rows belong to the deleted parent.
Where to turn cascade delete on or off
- Open the Relationships window. In Access, go to the relationship layout where the parent and related tables are shown together. If the tables are not already joined, create the relationship first so you can edit its settings.
- Open relationship properties. Double-click the join line between the tables. In the edit dialog, find Enforce Referential Integrity, Cascade Update Related Fields, and Cascade Delete Related Records.
- Set the delete rule. Check Cascade Delete Related Records only when child records must be removed every time the parent is deleted. Clear the box when child rows must survive, even if the parent row is removed.
- Save and test safely. Copy the database file first, then test the relationship on that copy with a record that has known child rows. A delete rule can remove many rows in one action, so verify the actual business rule before you use it on live data.
Suppose an Orders table uses OrderID as the primary key and OrderDetails stores that value as the foreign key. If you delete one order, Access can delete every matching detail row in the child table at the same time. That is correct only when detail rows have no meaning without the order.
Cascade delete vs cascade update
Cascade delete removes child rows. Cascade update changes foreign key values when the parent key changes. The two options often appear together in the same relationship dialog, but they do different work. Cascade update does not delete rows; it only keeps linked key values aligned when a primary key changes.
In practice, cascade update matters far less often than cascade delete because a primary key should rarely change. When it does change, Access updates the foreign key in the related table so the relationship still points to the same parent record.
What each option changes
- Cascade Delete Related Records: deletes related child rows when the parent record is deleted.
- Cascade Update Related Fields: updates matching foreign key values when the parent primary key changes.
- Enforce Referential Integrity: blocks child rows that do not match a parent key and prevents orphan records.
A common first-timer mistake is to treat cascade update as a safety net for cascade delete. It is not. Updating a key does not remove data, while deleting a parent with cascade delete can remove every related child row tied to that key.
Should this relationship use cascade delete?
Use cascade delete only when the business rule says child records have no valid use without the parent record. If the child table has independent value, audit value, or legal value after the parent is deleted, leave cascade delete off and delete child rows on purpose, one set at a time.
Orders and order details
Enable it when each order detail row exists only to describe one order. If the parent order is removed, the detail rows should go with it because they do not stand alone.
Customers and invoices
Usually avoid it. An invoice often needs to remain for accounting, tax, or audit reasons even if a customer record changes or is retired. Keep the invoice, and handle customer deletion with a separate archive or status rule.
Lookup tables and reference data
Usually avoid it. A lookup table, such as status codes or product categories, often feeds many rows across the database. Deleting one lookup row can break history or remove reference values that older records still need.
Parent records with audit history
Avoid cascade delete when the child table stores history, notes, approvals, or timestamps that answer “what happened” after the parent row changed. If the child rows matter as evidence, deletion should be deliberate, not automatic.
Picture a Staff table linked to a TrainingLog table. If training records must remain for compliance, deleting a staff row should not remove the log. In that design, cascade delete would erase evidence the business may need later.
Delete rules and failure cases
Referential integrity prevents orphan rows, but that same protection can block a delete if the relationship does not allow automatic child removal. If cascade delete is off, Access stops you from deleting a parent record that still has related child rows. If cascade delete is on, Access removes the matching child rows instead.
Failure cases usually show up when the relationship design does not match the real rule, when another object locks the records, or when the relationship chain is deeper than expected. Multi-level links can cause a delete in one parent table to ripple through several child tables if those relationships also allow cascade delete.
Orphan prevention with referential integrity
Referential integrity keeps child rows from pointing to a missing parent key. That means Access will not allow a child row whose foreign key does not match a valid parent primary key. This is the core control that keeps a one-to-many relationship consistent.
Locked records and related objects
If another user, form, report, query, or object has the related rows open or locked, the delete may fail or partially stop until the lock clears. Access cannot finish a delete cleanly if the target records are unavailable for change at that moment.
Multi-level relationships
Be careful when a parent table links to a middle table, and that middle table links to another child table. If cascade delete is enabled at more than one level, a single parent delete can remove a whole chain of related data. That is sometimes correct, but it should be intentional.
Delete recovery options in Access
After a cascade delete, recovery depends on whether you have a backup and whether the deleted rows were already committed. Access does not treat this as a reversible design feature. If the delete is saved, undo options are limited, and restoration may require returning to a backup copy or another saved source of the data.
Start by closing the database and checking the backup copy before you make any repair changes. If you compact and repair after a loss, you are not restoring deleted rows; you are only working with the current file structure. Do not expect every interface or query tool to bring back removed child rows once the delete has been committed.
- Stop further edits. Close forms, tables, and any process that could write more changes to the database. More writes make it harder to identify what was removed by the cascade.
- Check the last backup. Restore the most recent clean copy if the deleted rows are business-critical. That is the most dependable path when a cascade delete removed more than intended.
- Review the relationship. Confirm whether the child rows were deleted because the relationship allowed it, or because the design itself needs change. If the rule was wrong, fix the relationship before reopening the database to regular use.
- Document the loss window. Record which parent key was deleted and which child table was affected. That helps rebuild only the missing data and prevents reintroducing the same rule without review.
When a deletion is intentional but the child rows must survive, the safer pattern is a soft delete. Mark the parent as inactive instead of removing it, then keep the related rows intact. That approach preserves history and avoids automatic child removal, but it requires forms, queries, and reports to filter inactive rows consistently.
Cascade delete decision table
| Relationship type | Business rule | Data-loss risk | Recommended setting | Recovery option |
|---|---|---|---|---|
| Orders → OrderDetails | Detail rows exist only for one order | Low if orders are disposable; high if orders are audited | Enable cascade delete only when deleted orders should remove all details | Restore from backup if the delete was not intended |
| Customers → Invoices | Invoices must remain for accounting and tax history | High | Leave cascade delete off | Keep invoices; archive or deactivate the customer record |
| Products → SaleLines | Line rows depend on the product record only for the active sale | Medium | Usually off; use controlled delete rules instead | Rebuild lines from backup or source documents |
| StatusLookup → WorkItems | Lookup values are shared reference data | High | Leave off | Restore the lookup row and relink affected records |
| Projects → Tasks | Tasks are meaningless without the project | Low to medium | Enable only if project deletion should clear all tasks | Restore project and task rows from backup |
| Employees → TimeEntries | Time entries need to stay for payroll or audit | High | Leave off | Archive the employee and keep the time records |
| Tickets → TicketNotes | Notes are part of the ticket record set | Medium | Enable only if the full ticket set should vanish together | Restore the parent ticket first, then related notes |
| Categories → Items | Items may move to another category or keep history | High | Leave off | Reassign items before deleting the category |
Frequently asked questions
How do delete related records cascade rules work in Microsoft Access?
Access uses the relationship between a parent table and a child table to decide what to remove. If enforce referential integrity and Cascade Delete Related Records are both on, deleting a parent row removes the related child rows whose foreign key matches that parent primary key.
What happens when I delete a parent record in Access?
If cascade delete is off, Access blocks the delete when related child rows still exist. If cascade delete is on, Access deletes the parent row and the matching child rows together. That prevents orphan rows, but it also makes the delete much broader than a single record.
Can I turn off cascade delete in Access relationships?
Yes. Open the Relationships window, edit the join line, and clear Cascade Delete Related Records. You can keep referential integrity on while disabling automatic child-row deletion, which is the usual choice when related data should survive the parent record.
How do I stop Access from deleting related records automatically?
Turn off Cascade Delete Related Records in the relationship settings. If the database still needs the records preserved, also review your forms and delete queries, because manual delete actions can still remove data even when the relationship itself no longer cascades.
What is the difference between cascade update and cascade delete in Access?
Cascade update changes linked foreign key values when a parent key changes. Cascade delete removes child rows when the parent row is deleted. One keeps keys aligned; the other removes data. They are separate options in the same relationship dialog.
Can deleted records be restored in Access if cascade delete removed related rows?
Not reliably through the relationship itself. Once the delete is committed, recovery depends on backups or whatever separate record-preservation method your database uses. Do not assume Access can reverse a cascade delete after the fact; plan for backup-based recovery instead.