Delete query (joined 3 tables) could not delete from specified tab

G

Guest

I have 3 tables joined together. The relationship between the 3 tables are
based on a field called record number.
when I try to run the query I keep getting the Could not delete from
specified tables.
I have set my UniqueRecords property to YES.
My Cascade Delete Related Records Check box is checked to enable cascade
deletions. (taken from article 240098 from the MS knowledgebase)

Can anyone out there help this beginner out?
 
G

Guest

First try and change the UniqueRecords Property of the query to true
if it doesnt work then create three seperate queries for each table

or create relation ship between the three so when you delete one table
access will delete the rest
 
J

John Spencer (MVP)

Well, you can only delete from one table at a time. So if you have fields from
multiple tables in the DELETE statement, the delete will normally (always?) fail.

Sample that should work:

DELECT DistinctRow TableMaster.*
FROM TableMaster INNER JOIN TableSubordinate
ON TableMaster.RecordNumber = TableSubordinate.RecordNumber
WHERE TableSubordinate.CityName = "atlanta"

Sample that should Fail:

DELECT DistinctRow TableMaster.*, TableSubordinate.CityName
FROM TableMaster INNER JOIN TableSubordinate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top