absolute position of a recordset after deletaion a record

adsmmg

Registered User.
Local time
Yesterday, 18:44
Joined
Nov 27, 2007
Messages
10
i have a section in the form that displays the current location of the recordset and refresh in form.current event
but when i delete the current record the code breaks because of the AbsolutePosition

lblLocation.Caption = CStr(Me.Recordset.AbsolutePosition + 1)
 
Well... what did you expect? A deleted record no longer exists so HAS no position.
 
after delete a record the other record of the recordset is on the form and this record has a absolute position and this position is diplayed on the form at the form.current(). my problem is that after delete a record I cant display the record position and there is fault.
 
After a delete, perhaps do a requery or a findnext or something that forces the recordset variable to be updated consistently.
 

Users who are viewing this thread

Back
Top Bottom