Bookmark Question

Oct 3, 2005

This should be a simple one, but right now I just can't get it.
How do I get a Bookmark to pick up on the entry that I chose from in a combo box when there are multiple entries for the same item I want to chose from (ID - primary key is unique, just not the name of the item - 'FullP', and that is what I am using)?

For instance I want to be able to choose the correct record where 'FullP' will have multiple entries, but unique ID's.

Originally I had this bookmark off of a set of cascading combo boxes on a form, but unfortunately when using this set-up the ID (primary key) is not transfered foward, the rest of it works fine and it takes me to the first record for each 'FullP' (just not the correct record when multiples are entered). The record source for the combo is similar to:

“SELECT [LDetails].MDay, [LDetails].Session, [LDetails].DL, [LDetails].FullP “ & _
“FROM [LDetails] WHERE (((([LDetails].MDay)=Forms![DEntries]!EDay) “ & _
“And ([LDetails].Session)=Forms![DEntries]!Session) “ & _
“And ([LDetails].DL)=Forms![DEntries]!DL) “ & _
“ORDER BY [LDetails].FullP, [LDetails].ID;”
AND

Dim Rs As Object
Set Rs = Me.Recordset.Clone
Rs.FindFirst "[FullP] = '" & Me![FullP] & "'"
If Not Rs.EOF Then Me.Bookmark = Rs.Bookmark
Rs.Close
When changing the final combo box and binding it directly to the query, the primary key is transfered foward correctly, but I am still having problems getting it to go to the correct record.
I have added:


Dim Rs As Object
Set Rs = Me.Recordset.Clone
Me.RecordsetClone.FindFirst "[FullP] = '" & Me.FullP.Column(0) & "'"
If Not Rs.EOF Then Me.Bookmark = Rs.Bookmark
Rs.Close
This just takes me to the very first record...

I would really like to keep the cascade combo boxes working.
Any ideas?

View Replies


ADVERTISEMENT

Bookmark To A New Form

Jun 13, 2005

I have a search form (Form A) that as I type in a text box the contents of the listbox refreshes to show only those items that match the text in the text box.
When you double click on any of the items in the listbox it jumps me to a detail form based on the ID field.
On the detail form, there is a subform for any notes which uses a listbox (it lists all the notes entered for that detail item).

The notes subform listbox is only displaying the first note entered in the database....
So if I search for information in case 43, I find case 43. I double click on case 43 and the details for case 43 pop up. I go to the notes subform and the listbox showing all the notes entered is only showing the notes for case number 1.

Any thoughts?

View 6 Replies View Related

#Error/Invalid Bookmark

Aug 7, 2007

I've found a few posts about this subject, on the forum, so I'm guessing that my database (or at least one table therein) has become corrupt.

I've tried the various suggestions I could find (compact and repair, import into a new Db, etc) and none have worked. I have, however, located a version of the database from the day before this error first occurred. I've checked the problematic table and it contains no 'Error#' lines.

The single table affected contains a lot of data and is pretty irreplaceable. I have daily backups, so no information will actually get lost, but if I can't add any new data to it (for fear of corruption) it won't be much use.

1) What causes this problem? I can't seem to find a definite answer to this one.
2) Is there one definite fix I can use to prevent the problem occurring again?

View 6 Replies View Related

Access Bookmark Problem

Feb 17, 2005

Hi, I am having some weird problems when using bookmarks. All I want to do is display 1 record at a time in a listbox each time a user clicks a button.

At the moment I save the bookmark value to a global variable, and when the user makes another click is should move to that record. Right now it gives me a "Not a valid Bookmark" error when I click on the button for the second time. First time is alright, but second time it comes up with that error. Any help is appreciated.

Here's an example of my code


Option Compare Database
Dim varbookmark As Variant

Private Sub cmdadd_Click()
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset

Set cnn = CurrentProject.Connection
strSQL = "SELECT * " & _
"FROM tblHotel"

rst.Open strSQL, cnn, adOpenStatic

With lstHotel
.ColumnCount = 4
.ColumnWidths = "1in;"
End With

Do While rst.EOF <> True
If varbookmark = "" Then
lstHotel.AddItem rst!Name
rst.MoveNext
varbookmark = rst.Bookmark
Exit Sub
Else
rst.Bookmark = varbookmark
lstHotel.AddItem rst!Name
rst.MoveNext
varbookmark = rst.Bookmark
Exit Sub
End If
Loop

End Sub

View 1 Replies View Related

Not A Valid Bookmark When Opening Database

Feb 6, 2008

Hi,

I tried to search the forums for an answer but I still can't seem to solve the problem.
I receive the "Not a valid bookmark" error message when attempting to open my database. I have tried the compact tool through access and also jetcomp but it just brings up the same error message on access and says "error compacting database" on jetcomp. Can anyone provide a solution to my problem in order that i can either open the database or else retrieve data from it?
Many thanks, any help appreciated
Jon.

I have attached the database in case you have any software which might be of use.

View 1 Replies View Related

#error - #deleted - No Valid Bookmark??

Sep 21, 2005

Hi all,

one of the databases at my place has started acting really strange and was wondering if anyone knows what could possibly be wrong?

there's only one big tble holding about 7.5 k records with approx 10 fields

info that was entered yesterday has now been deleted (by access?) and when you scroll down or go down to the end records, all those records that were there yesterday now show either #error or #deleted and then an error popup appears saying "Not Valid Bookmark"

The UID doesn't appear to be working either, i.e it's not incrementing properly?

any ideas?

View 2 Replies View Related

Modules & VBA :: Overlapping Text In A Bookmark?

Nov 4, 2013

I send a picture (transparent png) from access 2010 to a word bookmark and would like to place it overlapping the text.

With wdDoc
.Bookmarks("Signature").Range.InlineShapes.AddPict ure "mysignature.png"
.Bookmarks("Signature").Range.InlineShapes.ShapeRa nge.WrapFormat.AllowOverlap = True

Sending the picture works fine but how can I define the overlapping as the second line does not work?

View 1 Replies View Related

Forms :: Creating A Favourite / Bookmark Flag?

Nov 5, 2013

I have a knowledge base database which lets the user search for articles containing answers to common problems and issues. Some of the users want to be able to bookmark certain useful articles. The DB is a front end/back end design so I am thinking if I have one table stored in the front end which can be used to store that particular user's favourites then that would be great. However, I a little stuck on how to implement this. Ideally, I'd like a simple checkbox option next to each article, which when ticked, would store that article ID in that user's local front end.

View 3 Replies View Related

Forms :: Bookmark And Subform In Current Event

Nov 2, 2013

I have in the current event:

Private Sub Form_Current()
If Not Me.NewRecord Then
With Me.Q_Subform.Form
.RecordsetClone.FindFirst "N=" & Me.N
.Bookmark = .RecordsetClone.Bookmark
End With
End If
End Sub

The problem is that when the Q_Subform has no records I have the error 3021.

How can manage it. It's the last step before ending My db

View 3 Replies View Related

Combo Bound Column To Word Bookmark Conflict

Jul 6, 2005

Ok....Just when you think it's all running smoothly.... :(
I have a combo box, MDLastName, with a column count of 9, with column 2 displaying and all others hidden. The selection made with this combo populates 7 corresponding fields (first name, address, etc). It's working perfectly.

The first problem I encountered was with identical last names, but different corresponding data. When I selected Jones, for example, it would populate the first Dr. Jones and his info, listed in the table. However, if I selected the second Dr. Jones in the combo list, it was still populating only the first Dr. Jones' info. I resolved this by binding the fist column (ID, aka primary key), but still hiding all colums but column 2. First problem fixed..

Next, I have a Word Template document bookmarked to receive data from the form, frmDenial. I have all the coding working fine and dandy to insert the data from the fields on the form, save, and print. However, instead of inserting the text from the MDLastName, it is inserting the primary key (because it is the bound column in the combo box). Now, because of the first problem discussed above, I cannot change the bound column to column 2 (containing the data I need in the Word Template). How can I get the right info to appear in my template with the bookmarks?

View 1 Replies View Related

Modules & VBA :: Requery Continuous Form And Maintain Bookmark

Jul 11, 2013

I have this code:

Public Sub cmdRequery_Click()
Dim vFlag As String
vFlag = Me![EncounterNbr]
Me.Requery

With Me.Recordset
.FindFirst "[EncounterNbr] = '" & vFlag & "'"
Me.Bookmark = .Bookmark
End With

The user starts on a continous form and opens a record, makes some changes, and then when that form closes it triggers this public sub.

The code does what I want it to do in that it returns to the last encounter number that was selected (now on the continous form again) and it requeries and shows anything that was changed about the record on the form that was closed before requery.......

But it always resorts and moves it and I want it to stay in the same spot unless the user sorts. Is there any way to make that happen?

View 9 Replies View Related

Queries :: Yes / No Field As Bookmark In Table With Names - Open To Last Or First Check

May 21, 2013

I have a yes/no field as a book mark in a table with names. How can I query it to open to the last or the first check?

View 13 Replies View Related

Taking Multiselected Items From Listbox And Adding To Bookmark Location In Word

Feb 1, 2013

I understand how to pass text boxes to bookmarked locations in Word, but when it comes to combo boxes, list boxes, or option buttons, I am lost. So, my problem this time is the following:

I have an access user form that is asking the user to input data and make selections. Once entered I am trying to get everything to export directly to respective bookmarked locations in a Word Report. I have my text boxes working and I have the combo box now working. The issue I am experiencing is with the user making multiple selections from a list box and I am not really sure how to get that to export to the word document.

Here is what I have:

Code:
Dim strNames As String
Dim ctl As Control
Dim varItem as Variant
'ensure the user has made a selection from the testers name text box
If Me.testersNamesText.ItemsSelected.Count = 0 Then
MsgBox "You must select at least 1 Capability Testers Name"

[Code] ....

I am very new to trying to code with the Visual Basic side of things, I know this is probably the best method to do this but the issue that I am experiencing is receiving a Null error for the line with

.Selection.Text = (CStr(Forms!WebBasedIFV!testersNamesText))

And when I attempt to pass the strNames in place of the testersNamesText I receive that the user form can't find the field "strNames" referred to in my expression.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved