Solved

Cannot Reset Bookmark from Recordsetclone

Posted on 2006-10-19
1
452 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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now