I have a list of records in a subform that a user can either edit or
delete. This is an unbound form. If the user deletes a record, I
want to refresh the form, and then position the cursor on the next
record on that subform. This seems like that this should be a fairly
easy thing to accomplish, but I cannot get it to reposition the cursor
on the next record. The following is my code segment:
Any help would be greatly appreciated!!!
Thanks.
Stuart
----------------------------------------------
(The record source is a query that returns all the records from the
Card1 table)
Set rst = Forms![frmedit]![card1 subform].[Form].RecordsetClone
rst.Bookmark = Forms![frmedit]![card1 subform].[Form].Bookmark
RecordPos = rst.AbsolutePosition
NCID = rst![NCID]
db.Execute "Delete * from Card1 where NCID = " & "'" & NCID & "'",
dbFailOnError
'Commit the database changes
wsp.CommitTrans
Forms![frmedit]![card1 subform].[Form].Requery
rst.MoveFirst
rst.Move RecordPos, rst.Bookmark
----------------------------------------------------