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?    
 
   
CHKarcher
post Feb 13 2008, 08:56 AM
Post#1



Posts: 504
Joined: 25-October 07
From: Oklahoma


I have a form that has a button that brings up another and displays records based on data on the frst form. The data on the popup form list out cetain records if I double click on a record selection it populates a string of data back to main form and closes.
All is fine
Then when I co to a another subform on the main form and try to enter in data I get
"Not a valid Bookmark"
If I cycle back the main form a record and forwar again I can enter into the subform no proble.
Can any one help with "Not a Valid bookmark"
thanks
steve
Go to the top of the page
 
strive4peace
post Feb 17 2008, 12:55 AM
Post#2


strive4peace
Posts: 20,461
Joined: 10-January 04



Hi Steve,

are you using the Bookmark property to find records? If so, you must realize that Bookmark is a dynamic value ... you cannot store a Bookmark, change a filter, and then use the stored Bookmark
Go to the top of the page
 
AndersRD
post Mar 3 2008, 11:26 PM
Post#3



Posts: 3
Joined: 3-March 08



I have a search field that permits me to enter (text) part number and then that record becomes the current record on the form. This has worked well for some time. Now, however,when searching for records added recently I get this error message. Searchs for records up to a specific point in the table work fine.
I have written a sub rountine to copy the data, field by field from the original table to a new table. With the new table as the record source for the form, the search begins to display this message at the same record as in the original table and for any subsequent that have been added to the table.
I would appreciate any suggestion that will solve this problem. Thank you for your help.
Go to the top of the page
 
strive4peace
post Mar 6 2008, 06:57 PM
Post#4


strive4peace
Posts: 20,461
Joined: 10-January 04



Hi Anders,

can you post the code you are using to find records?
When you post code, please be sure to use the Code tags around it -- look below message pane for tag to click on before you paste your code -- then put your code between the opening and closing tags ...using the "code" tags above and below your codeblock makes it much easier to read and preserves the indents and, therefore, makes it easier for others understand

{code} then your code then {/code}

-- substitute [ ] for { }

couldn't put square brackets in here or my message would have turned into a codeblock!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"I have written a sub rountine to copy the data, field by field from the original table to a new table"
why are you doing this?
Go to the top of the page
 
AndersRD
post Mar 7 2008, 12:30 AM
Post#5



Posts: 3
Joined: 3-March 08



Hi Crystal:
This is a copy of my code. Parts can be cross referenced to supplier's part number, manufactuer's part number, etc.. These are stored in separate tables but linked by a common 'PartID'. All other details of the part are stored in 'tblParts'. The current work around is to add a supplier's part number as well, and, this can be used to retreive the record from 'tblParts' for any newly added records. The first several hundred records can be retreived successfully by entering a 'PartNo' in text box and then click the search button that runs this code, but any newly added records can not.
[code]
On Error GoTo Err_cmdSearch_Click
Set db = CurrentDb
'check parts table for the indicated part
Set rs = db.OpenRecordset("tblParts", dbOpenDynaset)
With rs
.FindFirst "[PartNo] = '" & Me.txtPartSearch & "'"
If .NoMatch = False Then
Me.Bookmark = .Bookmark
intFlag = 1
Else
.FindFirst "[CommonNo] = '" & Me.txtPartSearch & "'"
If .NoMatch = False Then
Me.Bookmark = .Bookmark
intFlag = 1
End If
End If
.Close
End With
If intFlag = 1 Then
Set db = Nothing
Exit Sub
End If
'if not found check for supplier's part number
Set rs = db.OpenRecordset("tblSupplierPart", dbOpenDynaset)
rs.FindFirst "[SupplierPartNo] = '" & Me.txtPartSearch & "'"
If rs.NoMatch = False Then
lngPart = rs!PartID
rs.Close
intFlag = 2
End If
'if not found check for manufacturer's part number
If intFlag <> 2 Then
Set rs = db.OpenRecordset("tblManufacturerPart", dbOpenDynaset)
rs.FindFirst "[ManufacturerPartNo] = '" & Me.txtPartSearch & "'"
If rs.NoMatch = False Then
lngPart = rs!PartID
rs.Close
intFlag = 2
End If
End If
'if not found check for application Specific part number
If intFlag <> 2 Then
Set rs = db.OpenRecordset("tblAppSpecificPart", dbOpenDynaset)
rs.FindFirst "[ApplicationPartNo] = '" & Me.txtPartSearch & "'"
If rs.NoMatch = False Then
lngPart = rs!PartID
rs.Close
intFlag = 2
End If
End If
If intFlag = 2 Then
Set rs = Me.RecordsetClone
rs.FindFirst "PartID = " & lngPart
If rs.NoMatch Then
MsgBox "Record not found"
Else
Me.Bookmark = rs.Bookmark
End If
rs.Close
Set db = Nothing
End If
Exit_cmdSearch_Click:
Exit Sub
Err_cmdSearch_Click:
MsgBox Err.Description
Resume Exit_cmdSearch_Click

End Sub
[/ Code]
Thank you, Roy
Go to the top of the page
 
AndersRD
post Mar 11 2008, 01:11 PM
Post#6



Posts: 3
Joined: 3-March 08



Hi:
change in the record source has made all the records available for the search. I do not understand why, but it seems to work.
The record source for the form is "tblParts". When I set the record source for this sub routine to a record set clone of the form rather than the actual table (tblParts) the search again worked for all records in the table.
Thank you for your interest.
Roy
Go to the top of the page
 
kfreeman@thealig...
post Oct 13 2019, 10:24 AM
Post#7



Posts: 1
Joined: 29-January 19



Hi CHKarcher,

I am having the same problem you reported...did you ever resolve your issue? I'm looking for answers...

Kelley Freeman
Go to the top of the page
 
arnelgp
post Oct 13 2019, 10:33 AM
Post#8



Posts: 1,510
Joined: 2-April 09
From: somewhere out there...


tell us more about the forms and which area is not working.

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
GroverParkGeorge
post Oct 13 2019, 11:17 AM
Post#9


UA Admin
Posts: 36,029
Joined: 20-June 02
From: Newcastle, WA


First, Welcome to UtterAccess.

As a general rule, it's usually better to start a new discussion rather than tagging on to one that is now several years old. Sometimes such posts don't get the attention they would otherwise. Plus you can provide a link to the previous discussion if appropriate.

Here, we need a good deal more information about your database before we can attempt to suggest answers.

Start with the tables and the relationships between them. All Relational Database Applications are built around relational tables; when that design is appropriate, it's time to move on to the interface objects, i.e. forms and reports.

Tell us what this Access Relational Database Application is supposed to do (in broad terms), how the tables are set up and the relationships between them. And then we can look into the forms where you need these procedure.

Thanks.

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


Custom Search


RSSSearch   Top   Lo-Fi    14th November 2019 - 04:28 AM