I hope this is an easy one, but I can't figure it out even after lots of googling. I'm trying to run a delete query where two tables (T_Instrument_Registry and T_CustomerList) are joined by [Cust_Rep_Office] and [Distributor #]) and match. But I keep getting an error to "Specify the table containing the records you want to delete." Any help would be greatly appreciated.
Here is what I have.
DELETE T_Instrument_Registry.[Distributor #], T_Instrument_Registry.Segment, T_Instrument_Registry.Item, T_Instrument_Registry.Cust_Rep_Office, T_Instrument_Registry.Qty, T_Instrument_Registry.[Initial or Update], T_Instrument_Registry.[Date Updated], T_Instrument_Registry.[Previous Distributor], T_Instrument_Registry.Comments
FROM T_Instrument_Registry INNER JOIN T_CustomerList ON (T_Instrument_Registry.[Distributor #] = T_CustomerList.[Distributor #]) AND (T_Instrument_Registry.Cust_Rep_Office = T_CustomerList.Cust_Rep_Office)
WHERE (((T_Instrument_Registry.Cust_Rep_Office) In (SELECT [T_Instrument_Registry].Cust_Rep_Office
FROM [T_Instrument_Registry] LEFT JOIN [T_CustomerList] ON [T_Instrument_Registry].Cust_Rep_Office = T_CustomerLIst.Cust_Rep_Office
WHERE ((([T_CustomerList].Cust_Rep_Office) Is Null)))));
Here is what I have.
DELETE T_Instrument_Registry.[Distributor #], T_Instrument_Registry.Segment, T_Instrument_Registry.Item, T_Instrument_Registry.Cust_Rep_Office, T_Instrument_Registry.Qty, T_Instrument_Registry.[Initial or Update], T_Instrument_Registry.[Date Updated], T_Instrument_Registry.[Previous Distributor], T_Instrument_Registry.Comments
FROM T_Instrument_Registry INNER JOIN T_CustomerList ON (T_Instrument_Registry.[Distributor #] = T_CustomerList.[Distributor #]) AND (T_Instrument_Registry.Cust_Rep_Office = T_CustomerList.Cust_Rep_Office)
WHERE (((T_Instrument_Registry.Cust_Rep_Office) In (SELECT [T_Instrument_Registry].Cust_Rep_Office
FROM [T_Instrument_Registry] LEFT JOIN [T_CustomerList] ON [T_Instrument_Registry].Cust_Rep_Office = T_CustomerLIst.Cust_Rep_Office
WHERE ((([T_CustomerList].Cust_Rep_Office) Is Null)))));