O
Opal
Initially, I was using the following for users to search records on a
form:
Private Sub cboMoveTo_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.cboMoveTo) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[CassetteID] = " & Me.cboMoveTo
If rs.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
Me.Refresh
End Sub
But I had a problem in that there are 29 cassettes and for each of the
29 cassettes there are 99 cassette IDs so I added a second combo
box and attached the same code above to search ID numbers but the
combo boxes work separately from one another and the user does not
get the desired results from their search. If I use just one combo box
I will have to show 2871 records which is not a good idea.
I have been looking at Allen Browne's "Combos with Tens of Thousands
of Records":
http://allenbrowne.com/ser-32.html
But his record source is one table and I am pulling from two. Should
I
combine into one table or is there another suggestion?
form:
Private Sub cboMoveTo_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.cboMoveTo) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[CassetteID] = " & Me.cboMoveTo
If rs.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
Me.Refresh
End Sub
But I had a problem in that there are 29 cassettes and for each of the
29 cassettes there are 99 cassette IDs so I added a second combo
box and attached the same code above to search ID numbers but the
combo boxes work separately from one another and the user does not
get the desired results from their search. If I use just one combo box
I will have to show 2871 records which is not a good idea.
I have been looking at Allen Browne's "Combos with Tens of Thousands
of Records":
http://allenbrowne.com/ser-32.html
But his record source is one table and I am pulling from two. Should
I
combine into one table or is there another suggestion?