Merhaba ben aşağıdaki kodları kullanıyorum...
Combobox ile arama;
Aranılan isim ile tamam eşleşen kayıtlar listelenir.
Private Sub Combo1_Change()
On Error Resume Next
If Combo1.Text = "" Then
Adodc1.Recordset.Filter = ""
Adodc1.Refresh
Else
Adodc1.Recordset.Filter = "Ad= '" & Combo1.Text & "'"
End If
End Sub
Textbox ile arama;
Aranılan isim ile tamam eşleşen kayıtlar listelenir.
Private Sub TextBox1_Change()
On Error Resume Next
Dim a, B
If TextBox1.Text = "" Then
Adodc1.Recordset.Filter = ""
Adodc1.Refresh
Else
Adodc1.Refresh
a = TextBox1.Text
B = "Ad='" & a & "'"
Adodc1.Recordset.Filter = B
End If
End Sub