N
Nick Mirro
I have a listbox that shows records from a query. These records are
separate from the form's
recordsource. The listbox also is used as a record selector for the form.
If the
form is filtered prior to selecting a record from the listbox,
ShowAllRecords clears it,
but causes this error: (only happens if form is 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
I'm not sure what it means? Any way to prevent this error?
separate from the form's
recordsource. The listbox also is used as a record selector for the form.
If the
form is filtered prior to selecting a record from the listbox,
ShowAllRecords clears it,
but causes this error: (only happens if form is 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
I'm not sure what it means? Any way to prevent this error?