Not a valid bookmark error

N

Nick Mirro

A listbox looks shows records from a query, separate from the forms
recordsource. It also is used as a record selector for the form. If the
form is filtered, ShowAllRecords clears it, but causes this error: (no
error if form recordset is not filtered)

*** "Not a valid bookmark"


Private Sub lstRecentPatients_AfterUpdate()

' Find the record that matches the control.
Dim rs As Object

' MsgBox Me.ContactsList
Set rs = Me.Recordset.Clone

DoCmd.ShowAllRecords
rs.FindFirst "[PatientID] = " & Nz(Me![lstRecentPatients], 0)
If Not rs.EOF Then Me.Bookmark = rs.Bookmark***

End Sub


Any way to prevent this error? I'm not sure what it means?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top