Solved

Cannot Reset Bookmark from Recordsetclone

Posted on 2006-10-19
1
514 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

688 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