473,405 Members | 2,349 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,405 software developers and data experts.

Err - Not a Valid Bookmark

Hi...Below is my code where I am trying to get the recordsetclone of one page and take it to an Edit page where I can edit it. There are onlyl two pages, one primary key, Topic Number. Anyone have any ideas where I'm going wrong? I've checked the properties on the Edit form. I've tried bining them and unbounding them to no avail! :confused:

Private Sub btn_EditTopic_Click()

On Error GoTo Err_btn_EditTopic_Click
Dim Criteria As String
Dim MyRS As DAO.Recordset

'Find the record that matches the control
'Check to see if the Details -Edit Topic form is open. If it
'is not open, open it. It has to be open in order to clone the rs
'then need to set focus to Edit Topics

If Not SysCmd(acSysCmdGetObjectState, acForm, "Edit Topic Information") Then
DoCmd.OpenForm ("Edit Topic Information")
End If

'Set the recordset to a copy of the currently displayed data on the TopicInfo screen
Set MyRS = Me.RecordsetClone

'Build the Criteria...where Topic Number = the Forms' TN
Criteria = "Topic_Number= '" & Me!Topic_Number & "'"

'Perform the search
MyRS.FindFirst Criteria

If Not MyRS.NoMatch Then
****ERROR = NOT A VALID BOOKMARK *****
Forms![Edit Topic Information].Bookmark = MyRS.Bookmark
End If

'Close the recordset
MyRS.Close

DoCmd.Close acForm, "[Topic Information]"

'show form 1 with the bookmarked record?
DoCmd.OpenForm ("Edit Topic Information")



Exit_btn_EditTopic_Click:
Set MyRS = Nothing
Exit Sub

Err_btn_EditTopic_Click:
MsgBox Err.Description
Set MyRS = Nothing
Resume Exit_btn_EditTopic_Click
End Sub
Jun 6 '06 #1
1 3359
I know this post is old but I wanted to respond for others which might be searching help on this error.

Make sure that in ALL your data tables, you have an autonumber field (it doesn't necessarily have to be the primary key which there is a difference between an autonumber and a primary key field although the autonumber field is often used as a primary key.) Also make sure you have properly indexed fields.

Many, many corruption errors in Access tables simply stem from not having an autonumber field in the table (as well as data not saving in forms). Trust me, creating an autonumber field will make your life a lot easier!

- pkstormy is a moderator on the www.dbforums.com website and is often found helping users in the MSAccess forum.
Apr 9 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Thelma Lubkin | last post by:
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 = "...
0
by: pj | last post by:
A form for Purchase order entry, header and footer. When entering details of purchase in footer, on exiting to go to next record a message "No valid bookmark" appears. There is no bookmark on this...
6
by: Chris | last post by:
I have been learning C and want to write a program and need someone to point me in the write direction. I want to write a program to store all my webpage bookmarks in possibly one file. I want it...
14
by: ml_sauls | last post by:
I've built a system to enter and manage purchase orders. This is in use by >10 clients. Some use it in Access 97, most are in A2k. About half use it through a Citrix implementation. It is...
2
by: Alan T | last post by:
How do I make use of the Bookmarks property so that I can write a text at/below the position of a particular bookmark or the first bookmark ? private Microsoft.Office.Interop.Word.Document...
0
by: Alan T | last post by:
My code can select the content of a Word document between 2 bookmarks: if (bookmarks.Exists("first bookmark") & bookmarks.Exists("second bookmark")) { object oFirstBookmark = ("first...
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...
2
by: Michael R | last post by:
Hello all. While opening a report I get "Not a valid bookmark" run-time error. DoCmd.OpenReport "rptEnt_Graph", acViewPreview The report is built on a query which is simple and opens without...
1
by: auburnzx | last post by:
Hi Everyone, I’m new here and also just beginning to learn VBA. I’m setting up a new database. The main form (which is bound to a table) has a lot of controls for staff to enter info into. For...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...

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.