I created the Data report with Data Environment;
While I bound the text controls to Ado Data Control (Adodc1)


'Filter Code
Private Sub cmdFilter_Click()
On Error Resume Next
With Adodc1.Recordset
.MoveFirst
.Filter = "surname= '" & txtsearch.Text & "'"
If .EOF Then
MsgBox "Invalid Data", vbOKOnly, "Search info"
Adodc1.Refresh
Else

End If
End With
End Sub

What could be the problem?