why ".Bookmark = .LastModified"?

  • Thread starter Thread starter Paul W
  • Start date Start date
P

Paul W

Hi - I'm taking over an Access 2000 app.

In any loop where the code adds/edits data to a recordset, it has this:

while...
.AddNew
...
.Update
.Bookmark=.LastModified
end

I understand what the last line would do, I just don't understand what good
it might do in this situation. Any thoughts?

Thanks,

Paul.
 
1) The programmer will want to do more editing of this record later in the
code, so this code step avoids the need to go looking for the record again.

2) The programmer wants to use the autonumber field value later in the code.

3) The programmer just copied the code from somewhere else and didn't know
why the code step was there, either, so he/she left it in "just in case it
does something really, really, really important".
 
Paul, you should be aware that the newly added record is *not* automatically
the current record, i.e. unless you set the bookmark to the LastModified,
you should not go on to do other things with this record or its values.

That's essentially what was behind Ken's #1 and #2.
 
Back
Top