Deleting and Adding to Recordset in SubForm

A

Ali

Hi!

I've searched through past postings and noticed that many people had
issues with the AbsolutePosition property of recordsets, particularly
when used on a continuous subform. I am currently having a similar
problem. As was the case with most of the postings, I recently
converted from MDB to ADP/SQL Server.

When a record is deleted from the recordset through the subform and
another record is added in the same position within the recordset, I
get the following error:
"Row handle referred to a deleted row or a row marked for deletion."

I think this error occurs due to a combination of problems:
1. There is delay between when the record is added to the recordset
and when it is added to the underlying table.
2. Deleting the record leaves the AbsolutePosition property in an
unstable state, which may also occur from a delay.

After I create the new record, it is inserted into the table, and I
attempt to update certain fields of the record with data from another
recordset with a different source. It is when this update takes place
that the error occurs. However, if I click on other record and then
go back to the new record before updating, the error is not generated.
It seems that the recordset is trying to reassign the row handle from
the deleted record to the new one; however, while the handle is
associated with the new record, it is marked for deletion and cannot
be updated with the new record's data.

I've read where many people recommend not using recordsets, but I'm
hoping to find a workaround before I go that route.

Any advice is greatly appreciated.

Thanks,

Ali
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top