Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2006

Tip: Looking for answers? Try searching our database.

Return to record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Snowsride - 02 Feb 2006 15:29 GMT
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
Wayne Morgan - 02 Feb 2006 16:56 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.