D
david epsom dot com dot au
I have code like this:
--------
MsgBox rs2ndContract!idxRecord & ":" & lngContractOld
db.Execute (strDelete + str$(lngContractOld) + ");")
rs2ndContract.Edit
--------
The message box tells me that I have two different
records: 200065:200064
The second line deletes record 20064
The third line fails with error "Record is Deleted"
Record 200065 clearly is NOT deleted.
Local tables: Access 2000: 4 records in the table:
rs2nContracts is a dynset opened with this SQL:
SELECT * FROM [tblFT_Contracts_Net_Temp] WHERE (
([tblFT_Contracts_Net_Temp].idxFutureItem = 45) AND
([tblFT_Contracts_Net_Temp].idxFutureItemCode = 11) AND
([tblFT_Contracts_Net_Temp].datMaturity = #2006-05-05#) AND
([tblFT_Contracts_Net_Temp].flgAction = true) AND (sgn(dblQty) = -1));
The delete query looks like this:
DELETE * FROM [tblFT_Contracts_Net_Temp]WHERE
([tblFT_Contracts_Net_Temp].idxRecord= 200066);
--------
MsgBox rs2ndContract!idxRecord & ":" & lngContractOld
db.Execute (strDelete + str$(lngContractOld) + ");")
rs2ndContract.Edit
--------
The message box tells me that I have two different
records: 200065:200064
The second line deletes record 20064
The third line fails with error "Record is Deleted"
Record 200065 clearly is NOT deleted.
Local tables: Access 2000: 4 records in the table:
rs2nContracts is a dynset opened with this SQL:
SELECT * FROM [tblFT_Contracts_Net_Temp] WHERE (
([tblFT_Contracts_Net_Temp].idxFutureItem = 45) AND
([tblFT_Contracts_Net_Temp].idxFutureItemCode = 11) AND
([tblFT_Contracts_Net_Temp].datMaturity = #2006-05-05#) AND
([tblFT_Contracts_Net_Temp].flgAction = true) AND (sgn(dblQty) = -1));
The delete query looks like this:
DELETE * FROM [tblFT_Contracts_Net_Temp]WHERE
([tblFT_Contracts_Net_Temp].idxRecord= 200066);