Solved

Cannot Reset Bookmark from Recordsetclone

Posted on 2006-10-19
1
480 Views
Last Modified: 2008-03-10
I am setting a bookmark of a recordsetclone and then requerying the data.  When I try to set my recordset back to the original record I get the error message "No Current Record".

This is all happening in the Form_Timer Event

Dim rs as Dao.Recordset

Set rs = Me.Recordsetclone
rs.Bookmark = Me. Bookmark
Me.Requery
Me.Bookmark = rs.Bookmark ' This is where the error occurs.

I have tried a few different variations on this (i.e. forms!formname.bookmark).

Where am I going wrong?

Thanks,

Bill from PA
0
Comment
Question by:bshort1023
1 Comment
 
LVL 39

Accepted Solution

by:
stevbe earned 125 total points
ID: 17768262
first ...bookmarks are only good for the "life" of a recordset and .requery disposes and re-creates the recorsdset so using the previous bookmark (while usually works) is not actually a vaild process.

I would grab the value of the Primarykey field and do a find first ...

Dim lngID As Long

lngID = Me.cboID.Valuers
Me.Requery
Me.Recordset.FindFirst "ID=" & lngID

Steve
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question