Solved

Could not delete from specified tables

Posted on 2010-09-15
6
765 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
Independent Software Vendors: 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!

 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 125 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 125 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

726 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