I am trying to delete duplicate records from a table. I have successfully created a query to find the duplicates. My problem is running the query in the following statement
SQLDeleteDuplic ates = "DELETE " tblMoneyDue.*, tblMoneyDue.ID _
& "FROM tblMoneyDue WHERE (((tblMoneyDue. ID) = _
& "DLookUp("ID"," qryListCopiesTo Delete","ID" >1)))"
It is the DLookup part that is causing the problem! I am sure that I should not be using "" around ID and qryListCopiesTo Delete but do not know where to go next.
Any help gratefully received
SQLDeleteDuplic ates = "DELETE " tblMoneyDue.*, tblMoneyDue.ID _
& "FROM tblMoneyDue WHERE (((tblMoneyDue. ID) = _
& "DLookUp("ID"," qryListCopiesTo Delete","ID" >1)))"
It is the DLookup part that is causing the problem! I am sure that I should not be using "" around ID and qryListCopiesTo Delete but do not know where to go next.
Any help gratefully received
Comment