473,426 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

Invalid Bookmark Error

With Me!PERSONSLIST.Form.RecordsetClone
.FindFirst strID
If .NoMatch Then
Debug.Print "key " & Key & " nomatch"
Exit Sub
Else
If Me.Dirty Then Me.Dirty = False
Debug.Print "A_LOAD bookmark = " & .Bookmark
Debug.Print "A_LOAD cloneKey = " & .Fields("PrimKey")
' Me.Bookmark = .Bookmark
End If
End With

When I try to use the code above to reset the selected
record of a form's subform, I get the error "Invalid bookmark"
when I remove the comment symbol from the line

Me.Bookmark = .Bookmark

The debug.print of .Fields("PrimKey") seems to indicate that the
sought for record exists and can be correctly read.

What can I do about this?

--thelma
Nov 13 '05 #1
2 2557
You are trying to set the parent form's bookmark to the subform's bookmark.
These are two different recordsets. What exactly are you trying to do?

--
Wayne Morgan
MS Access MVP
"Thelma Lubkin" <th****@alpha2.csd.uwm.edu> wrote in message
news:da**********@uwm.edu...
With Me!PERSONSLIST.Form.RecordsetClone
.FindFirst strID
If .NoMatch Then
Debug.Print "key " & Key & " nomatch"
Exit Sub
Else
If Me.Dirty Then Me.Dirty = False
Debug.Print "A_LOAD bookmark = " & .Bookmark
Debug.Print "A_LOAD cloneKey = " & .Fields("PrimKey")
' Me.Bookmark = .Bookmark
End If
End With

When I try to use the code above to reset the selected
record of a form's subform, I get the error "Invalid bookmark"
when I remove the comment symbol from the line

Me.Bookmark = .Bookmark

The debug.print of .Fields("PrimKey") seems to indicate that the
sought for record exists and can be correctly read.

What can I do about this?

--thelma

Nov 13 '05 #2
Wayne Morgan <co***************************@hotmail.com> wrote:
: You are trying to set the parent form's bookmark to the subform's bookmark.
: These are two different recordsets. What exactly are you trying to do?

I want to reset the subform's bookmark, to change the selected
record displayed. I changed the code to actually do that and it
works now. Thank you for helping
--thelma
: --
: Wayne Morgan
: MS Access MVP
: "Thelma Lubkin" <th****@alpha2.csd.uwm.edu> wrote in message
: news:da**********@uwm.edu...
:> With Me!PERSONSLIST.Form.RecordsetClone
:> .FindFirst strID
:> If .NoMatch Then
:> Debug.Print "key " & Key & " nomatch"
:> Exit Sub
:> Else
:> If Me.Dirty Then Me.Dirty = False
:> Debug.Print "A_LOAD bookmark = " & .Bookmark
:> Debug.Print "A_LOAD cloneKey = " & .Fields("PrimKey")
:> ' Me.Bookmark = .Bookmark
:> End If
:> End With
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: deko | last post by:
I'm getting intermittent "Object Invalid or No Longer Set" errors in my Access 2002 mdb. What causes these errors? Has anyone dealt with this before? I can't trace it because it's not easy...
3
by: Paul | last post by:
I have an Access 2000 database with a form that is giving me some major headaches. When you open the form, it displays all records and allows editing, but has AllowAdditions set to False so that...
17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
2
by: Arnold | last post by:
Hey there, I just put the following code: DoCmd.GoToRecord , , acLast in the On Open event of my form, which has 2 subforms. The following error message appears when the form now opens: ...
5
by: Owen Jenkins | last post by:
I have a database running in Access (FE in 2000-2002 on local drive, BE in 2000 on network server). It has a main form with several subforms and several user-operated filtering options....
6
by: ImageAnalyst | last post by:
Try this: 1) In the code editor, double click some word. 2) Type control-F to bring up the search window. 3) Set the "Look in" drop down box to be "Entire Solution" 4) Click the "Bookmark All"...
4
by: zzapper | last post by:
Hi, I use an internal bookmark <form method="post" action="${form_action}#mark1"> to return to the correct place in the page. In case of an error I would wish to return to the top of the...
11
by: Tom Clavel | last post by:
I need to make sure that I am on a different record than I just was on, in a DAO recordset. code fragment: 1. strFind = "thisSource = " & tripID & " AND thisTrip = " & tripID 2. ...
4
by: Light1 | last post by:
My form (frmERLogs) for this project (ER Log Book) has a combo box (cboMedicalRecordNumber) that I want to be able to double click on to bring up a new form (frmPatientInformation) when a name is not...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.