Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
splat - 12 May 2005 14:16 GMT
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?    
Signature

It's as low as it can go when it hits me, SPLAT

Ofer - 12 May 2005 18:52 GMT
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

> I have 3 tables joined together.  The relationship between the 3 tables are
> based on a field called record number.  
[quoted text clipped - 5 lines]
>
> Can anyone out there help this beginner out?    
John Spencer (MVP) - 15 May 2005 22:49 GMT
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
 ON TableMaster.RecordNumber = TableSubordinate.RecordNumber
WHERE TableSubordinate.CityName = "atlanta"

> I have 3 tables joined together.  The relationship between the 3 tables are
> based on a field called record number.
[quoted text clipped - 7 lines]
> --
> It's as low as it can go when it hits me, SPLAT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.