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?
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?