Could not delete from specified tables. (Er 3086)
Iâm trying to batch delete a series of records, but Iâm getting an error that says it canât delete from the specified table. Apparently something Iâm doing is setting it to Read Only. Canât figure it out. Any part of this code look wrong to any of you?
DELETE DateDiff("d",[field17],Now()) AS Expr1, tblCROVIEW.Field23, HBA_UDSSHIP.SUBENROLLSTATUS, CREDALL.*
FROM CREDALL INNER JOIN ((HBA_UDSSHIP INNER JOIN ContactInfo ON HBA_UDSSHIP.CUSTOMERID = ContactInfo.FACCODE) INNER JOIN tblCROVIEW ON ContactInfo.FACCODE = tblCROVIEW.Field1) ON CREDALL.Field2 = tblCROVIEW.Field1
WHERE (((DateDiff("d",[field17],Now()))>210) AND ((tblCROVIEW.Field23) Between (Date()+120) And (Date()+160)) AND ((HBA_UDSSHIP.SUBENROLLSTATUS)="ENROLLED"));
I want to delete only records that match the codes that meet the criteria of having an expiration date that falls within a certain date range, the expiration date is held in the "tableCroview" table, field23
Field17 = equals the date
Enrolled status is held in UDSShip table
The records I want to delete are in the Credall table
|