MS Access Specify Table Error
Posted on 2009-12-23
I'm getting a "Specify the table containing the records you want to delete." Error.
This is the code I've generated from the Access GUI following the delete query tutorial:
DELETE Customers.*, Customers.[Last Name], Customers.[First Name], Customers.ID, Customers.Company
FROM [Customers - Distinct Query] AS [Distinct] INNER JOIN Customers ON Distinct.[Last Name] = Customers.[Last Name]
WHERE (((Customers.[Last Name])=[Distinct].[Last Name]) AND ((Customers.[First Name])=[Distinct].[First Name]) AND ((Customers.ID)<>[Distinct].[MinOfID]) AND ((Customers.Company)=[Distinct].[Company]));
I want to delete the fields in table Customers that are completely duplicated. I'm using the ID field, which is the autonumber primary key, to choose which one is to be deleted, using the MinOfID key. Could you help?