O
Opal
I am using two combo boxes so that the user can search a large
recordset.
Initially I used:
Private Sub cboMove1_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.cboMove1) 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.cboMove1 _
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
for my first combo box and the same for my second except:
rs.FindFirst "[CassetteNoID] = " & Nz(Me![cboMove2], 0)
Both boxes work fine on their own, but when I combine then
as follows:
rs.FindFirst "[CassetteID] = " & Me.cboMove1 _
And "[CassetteNoID] = " & Nz(Me![cboMove2], 0)
I get type mismatch errors and I am stumped as to how to resolve.
BTW, there are over 2800 records to search, so I need simple way
for the user to search. Any help would be appreciated.
recordset.
Initially I used:
Private Sub cboMove1_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.cboMove1) 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.cboMove1 _
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
for my first combo box and the same for my second except:
rs.FindFirst "[CassetteNoID] = " & Nz(Me![cboMove2], 0)
Both boxes work fine on their own, but when I combine then
as follows:
rs.FindFirst "[CassetteID] = " & Me.cboMove1 _
And "[CassetteNoID] = " & Nz(Me![cboMove2], 0)
I get type mismatch errors and I am stumped as to how to resolve.
BTW, there are over 2800 records to search, so I need simple way
for the user to search. Any help would be appreciated.