I am working with two recordsets A and B. Recordset A has a date field and
for a current record this is null. I have some code that finds the first
occurrence of a null value date and then moves back n times to find a record,
it then takes the values of that record and creates a new record in Recordset
B.
I want to be able to return to the null value record in A so that my code
can continue. I think I need to assign the Bookmark property of the null
date value record to a variable and then be able to return to the Bookmark
later but how do I do this?
Thanks
Yes, as long as you don't change the recordset A, bookmark should work.
Example:
Dim lngBookmark As Long
'find your record
lngBookmark = RecordsetA.Bookmark
'move back and get your value
RecordsetA.Bookmark = lngBookmark
Another option would be to get the value of the unique ID field for the
record then do a FindFirst on this value when you're ready to go back to the
record. Since there will only be one (it's a unique value), that will move
you back to the record also. This will also work even if you've done
something to make the bookmark value invalid.

Signature
Wayne Morgan
MS Access MVP
>I am working with two recordsets A and B. Recordset A has a date field and
> for a current record this is null. I have some code that finds the first
[quoted text clipped - 10 lines]
>
> Thanks