hello everyone, i need a tips about "search coding"
im using adodc connection:
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sistempengurusanrumahsewa.mdb;Persist Security Info=False"
Adodc1.RecordSource = "Select * from Owner"
Set DataGrid1.DataSource = Adodc1
im trying to make "search" button to search a Name in my datagrid1.
can anyone guide me a search coding?
im confused.
below is my search coding, it doesnt work. :(
Private Sub cmdSearch_Click()
Adodc1.Recordset.DataSource
If Combo1.Text = "Name" Then
ds = "[Name] '" + txtName.Text + "'"
.FindFirst ds
If .NoMatch Then
MsgBox "no name"
Else
DataGrid1.Recordset.Filter = "[Name] '" & txtName.Text & "'"
End If
End Sub