so i have to tables that have a relation between them – relation type: one to many.
and i thought that the following query:
DELETE Orderstbl.*, ItemsInOrdertbl.*
FROM Orderstbl INNER JOIN ItemsInOrdertbl ON Orderstbl.OrderID = ItemsInOrdertbl.OrderId
WHERE (((Orderstbl.OrderID)=26));
will delete all the rows in both tables that contain the OrderID = 26
but to my surprise it filled the following error :
could not delete from specified tables
tried to find an answer on google , didnt help much thanks in advance 😀
You could also create a relationship that includes
CASCADE DELETE, then when you delete from one it will delete from the otherfrom microsoft:
Using the
CASCADE DELETEis a simple and clean way to make sure the correct records are removed from both tables.Here is another article discussing CASCADE DELETE with MS-Access.
Delete one or more records from an Access database