UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Not A Valid Bookmark, Access 2016    
 
   
BrittBikes
post Jun 30 2020, 11:00 AM
Post#1



Posts: 19
Joined: 5-June 20



I am receiving the "Not A Valid Bookmark" error when doubling clicking a record in my SearchList. Below is the On Dbl Click VBA code:

CODE
Private Sub SearchList_DblClick(Cancel As Integer)
On Error GoTo Err_SearchList_DblClick
Dim db As DAO.Database
Dim RST As DAO.Recordset

DoCmd.OpenForm "Master_ManAcc_Form_EDIT_Invoice_Data"

Set RST = Forms!Master_ManAcc_Form_EDIT_Invoice_Data.Recordset.Clone


DoCmd.OpenForm "Master_ManAcc_Form_EDIT_Invoice_Data", acNormal, , "[ID_Invoice] = " & Me.SearchList

Forms!Master_ManAcc_Form_EDIT_Invoice_Data.Bookmark = RST.Bookmark

DoCmd.Close acForm, Me.Name

Exit_SearchList_DblClick:
    Exit Sub

Err_SearchList_DblClick:
    MsgBox Err.Description
    Resume Exit_SearchList_DblClick

End Sub


I have double checked all of the spellings of the form name. Any ideas where I am going wrong? Thanks.

Go to the top of the page
 
GroverParkGeorge
post Jun 30 2020, 11:07 AM
Post#2


UA Admin
Posts: 37,474
Joined: 20-June 02
From: Newcastle, WA


You reopened the same form AFTER setting the recordset reference to its recordsetclone. Is that what you wanted to do?

Why not just use the first instance to move the recordset clone to the desired record?

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
boobigbam@gmail....
post Jun 30 2020, 01:20 PM
Post#3



Posts: 13
Joined: 24-June 20



Try removing parts of you code so it only looks like this inbetween the SUB

On Error GoTo Err_SearchList_DblClick

DoCmd.OpenForm "Master_ManAcc_Form_EDIT_Invoice_Data", acNormal, , "[ID_Invoice] = " & Me.SearchList

DoCmd.Close acForm, Me.Name

Exit_SearchList_DblClick:
Exit Sub

Err_SearchList_DblClick:
MsgBox Err.Description
Resume Exit_SearchList_DblClick

This post has been edited by boobigbam@gmail.com: Jun 30 2020, 01:21 PM
Go to the top of the page
 
BrittBikes
post Jun 30 2020, 01:41 PM
Post#4



Posts: 19
Joined: 5-June 20



Thanks! I got it working.
Go to the top of the page
 
GroverParkGeorge
post Jun 30 2020, 01:58 PM
Post#5


UA Admin
Posts: 37,474
Joined: 20-June 02
From: Newcastle, WA


Sometimes it can be quite helpful to others when you share the solution to a problem. That way, we can all benefit from your experience and success. Thank you.

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    7th July 2020 - 11:19 AM