When you run a delete query, Access may display the error message Could not delete from the specified tables. This article lists cases in which you can use a delete query, explains why the error message appears, and provides steps for correcting the error.
There are a number of ways to delete records in Access. For a more thorough explanation of deleting records, see the article Ways to add, edit, and delete records.
In this article
Introduction
When you want to delete multiple records from a table in one operation, you can use a delete query. A delete query is successful when it:
-
Uses a single table that does not have a relationship to any other table.
-
Combines two tables that have a one-to-one relationship.
-
Uses a single table that is one the "one" side of a one-to-many relationship, and cascading delete is enabled for that relationship.
-
Includes both the table on the "one" side of a one-to-many relationship and the table on the "many" side of that relationship (for example, to use criteria on a field from the "many" table).
Important You must run the query twice to delete records from both tables.
Why am I seeing this error message, and how do I fix it?
If you build a delete query by using multiple tables and the query's Unique Records property is set to No, Access displays the error message Could not delete from the specified tables when you run the query.
To fix this problem, set the query's Unique Records property to Yes.
-
Open the delete query in Design view.
-
If the query property sheet is not open, press F4 to open it.
-
Click the query designer to show the query properties (rather than the field properties).
-
In the query property sheet, locate the Unique Records property, and set it to Yes.
No comments:
Post a Comment