Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get Delete query to run 1

Status
Not open for further replies.

Rascelon

Technical User
Mar 26, 2005
12
US
I get an error message that says,
"Could not delete from specified tables."
when I run a simple delete query between 2 tables with NO dependencies. Here is the SQL.

Code:
DELETE Table1.*
FROM Table1, Table2
WHERE (((Table2.ID)=[Table1].[ID]));

The ID column is the primary key for each of the tables and both are AutoNumber (Random). I can view the records that should be deleted when I choose Datasheet View from the edit mode of the Delete query and that looks fine.

Not sure what I'm doing wrong. Any help?
Vince
 
And what about this ?
DELETE FROM Table1
WHERE ID In (SELECT ID FROM Table2)


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Well... that was easier than I thought.
Thanks.
Vince
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top