Not a valid bookmark

  • Thread starter Thread starter msnews.microsoft.com
  • Start date Start date
M

msnews.microsoft.com

I m trying to assign the bookmark to a variable ( Var = me.Bookmark) on
navigation buttons , and displaying the current record at a label like
' " N th Record" Of "Total Record" '. Now when i go to delete a record I
assign that variable value to Book mark again.
e.g.
sub On_Delete( )
DeleteQuery
me.Bookmarq= Var
End sub
So that after deleting the Nth record i remain on same Nth record. This
code Gives error " Invalid Bookmark " with 1st and lase record However
works fine with values inbetween.

plz Let me know how shud i handle this.
 
So that after deleting the Nth record i remain on same Nth record.

But you can't go back to it after you've deleted it... I assume you mean
the next record, in which case that is the record you need to bookmark, not
the one you are about to delete. Bookmarks refer to records, not some kind
of place-in-queue.

You'll have to decide what to do about deleting the last record in the
recordset. Or the only one.

Best wishes


Tim F
 
Back
Top