
Deleting a record in a ADO recordset
When you delete a record from the recordset, the cursor has to move to point to
some record, doesn't it? My guess is that when you delete record 100 the
cursor automatically points to 99 since 100 is no longer there. Then your code
tells it to move back one more (moveprevious), hence you're now looking at 98.
Quote:
>When I want to delete a record in a ADO recordset, I use the following code:
>rs.Delete
>rs.MovePrevious
>If rs.BOF Then
> rs.MoveFirst
>Endif
>Quite simple, I thought.
>When I am deleting the first and the second record, everything goes as
>planned.
>When I am deleting another record in the set, the pointer doesn't move to
>the
>previous record as it should do, but to the record previous to the previous
>record (so it goes back two rexords).
>Anyone has any idea why that is and how it can be set straight?
>Many thanks and greetings from Brugge (Bruges - Belgium),
>Michel