Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a Recordset.Clone/Bookmark on a filtered recordset

Status
Not open for further replies.

jcw5107

Technical User
Jan 31, 2007
66
US
I have a form with a drop down box. The drop box filters the forms recordset to the selected item in the drop down. In the drop down there is an "All" selection - that shows all records if selected. I have a listbox that I am tryin' to use to "jump" to other records within the form that have a matching value from the listbox. The problem is when the form is in "filter mode" (the full recordset can be up to 150 records, then when the form is in "filter mode" the recordset can be from 1 to 25 records), I can not click on the listbox to jump to the other records that matches. I guess since the form is in "filter mode", it won't let me "jump" to other records outside of the filter even though the record is part of the "full" recordset....!!
I'm tryin' to use the listbox to get to other records that are in the forms recordset, but not in the forms recordset when the form is filtered....
Any suggestions or examples...??
Below is what I am working with...
Thanks inadvance..!!
jcw5107

Private Sub MultiSchdList_DblClick(Cancel As Integer)
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[WanNo] = " & Me.MultiSchdList.Column(0)
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

'Dim frm As Form, sCriteria As String

'Set frm = Forms!SchdAircraftReview
'sCriteria = "[WanNo] = " & Me.MultiSchdList.Column(0)

'With frm.RecordsetClone
'.FindFirst sCriteria
'If Not .NoMatch Then
'frm.Bookmark = .Bookmark ' go to the first record that matches
'End If
'End With

End Sub
 
Why not test for the filter?

[tt]If Me.FilterOn=True Then
MsgBox "Removing filter"
Me.FilterOn=False
End If
'Find record[/tt]

Or such like.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top