‘Specify the table containing the records you want to delete’.
I have searched the internet for an answer and played with the code but I have not been able to effect the deletion of the records. The archive table contains the ‘three field values’ which together supply a ‘unique reference’ to those records which need to be deleted from the ‘Holding Fee’ table; ‘Location ID’, ‘Room Number’ and ‘Date Of Arrival’. (The departing occupant records have already been appended to the ‘Holding Fee Archive’ so, for now, I am using the ‘Holding Fee Archive’ table as a source for the field criterion, ‘values’ which need to be met. I thought a table may be a more reliable source than a query). I need syntax which will ‘FIND’ and ‘DELETE’ records on the basis of WHERE ‘field 1 in table A = value in field 1 of table B’ and ‘field 2 of table A = value in field 2 of table B’ and ‘field 3 in table A = value of field 3 in Table B’ DELETE THESE RECORDS. I tried the following but it did not work.
Expand|Select|Wrap|Line Numbers
- DELETE tblHoldingFee.[Loc_ID HF], tblHoldingFee.[RM_No HF], tblHoldingFee.DO_Arrival
- FROM tblHoldingFee, tblArchive_HoldingFee
- WHERE (([tblHoldingFee].[Loc_ID HF] Like [tblArchive_HoldingFee.Loc_ID HF]) AND ([tblHoldingFee].[RM_No HF] Like [tblArchive_HoldingFee].[RM_No HF]) AND ([tblHoldingFee].[DO_Arrival] Like [tblArchive_HoldingFee.DO_Arrival]));