Avatar
Board Regular
- Joined
- Sep 20, 2005
- Messages
- 193
Greetings,
I have the following DELETE query called qry_DELETEOldRecords:
qry_TEMPSelectQuery is:
qry_TEMPSelectQuery returns 185175 records.
When i run or view qry_DELETEOldRecords, it is returning 278753 records - which is the entire contents of the table...
Copying the SELECT statement out of qry_DELETEOldRecords (marked in green) and createing a new query returns the correct 185175 records.
Making this new query into a make table query, returns the full 278753 records again...
An ideas whats going on here?
I have the following DELETE query called qry_DELETEOldRecords:
Rich (BB code):
DELETE tbl_RenewalImport.RenewalImport_ID, *
FROM tbl_RenewalImport
WHERE (((tbl_RenewalImport.RenewalImport_ID) In (SELECT RenewalImport_ID FROM qry_TEMPSelectQuery )));
qry_TEMPSelectQuery is:
Rich (BB code):
SELECT tbl_RenewalImport.RenewalImport_ID
FROM (tbl_RenewalImport LEFT JOIN tbl_FormUpdate ON tbl_RenewalImport.RenewalImport_ID = tbl_FormUpdate.RenewalImport_ID) LEFT JOIN tbl_SubRtdUpdate ON tbl_RenewalImport.RenewalImport_ID = tbl_SubRtdUpdate.RenewalImport_ID
WHERE (((tbl_FormUpdate.[FormRecieved?]) Is Not Null)) OR (((tbl_SubRtdUpdate.[SubReturned?]) Is Not Null));
qry_TEMPSelectQuery returns 185175 records.
When i run or view qry_DELETEOldRecords, it is returning 278753 records - which is the entire contents of the table...
Copying the SELECT statement out of qry_DELETEOldRecords (marked in green) and createing a new query returns the correct 185175 records.
Making this new query into a make table query, returns the full 278753 records again...
An ideas whats going on here?