?
Solved

Could not delete from specified tables

Posted on 2010-09-15
6
Medium Priority
?
777 Views
Last Modified: 2013-11-28
Hello,

I am receiving "Could not delete from specified tables" error when using this code.  Appreciate the help.

DELETE [Assignment - Deployed].*, [Project List].[Project Status]
FROM [Assignment - Deployed] INNER JOIN [Project List] ON [Assignment - Deployed].[Project ID] = [Project List].[Project ID]
WHERE ((([Project List].[Project Status])="Complete"));
0
Comment
Question by:dustywork
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 40

Expert Comment

by:als315
ID: 33683599
Is [Project List].[Project ID] key field?
 
0
 

Author Comment

by:dustywork
ID: 33683883
Yes.  Project ID is a key field in the Project List table.
0
 

Expert Comment

by:Lee-H
ID: 33683884
Do you have enforce referential integrity enabled on your relationships?
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 33683927
try this


DELETE [Assignment - Deployed].*
FROM [Assignment - Deployed], [Project List]
Where [Assignment - Deployed].[Project ID]
  IN (select [Project ID] from [Project List]
WHERE [Project Status]="Complete")
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 500 total points
ID: 33683939
your delete query contains multiple tables. if just deleting from one table then specify just that or try the UniqueRecords setting http://support.microsoft.com/kb/240098/en-us
0
 

Author Closing Comment

by:dustywork
ID: 33684646
Thanks to you both as I needed both to get to the solution.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question