Hi i am new to ActiveX and i get the following errors (with adodc1.Refresh highlighted):

syntax error in From Clause
Method 'Refresh' of object 'IAdodc' failed.

here's my code:

Private Sub txtname_Change()

adodc1.RecordSource = "Select * from tablecoy where coyname like '" & txtname.Text & "*'"
adodc1.Refresh

If txtname.Text = "" And txtcp.Text <> "" Then
adodc1.RecordSource = "Select * from tablecoy where cperson like '" & txtcp.Text & "*'"
adodc1.Refresh
Exit Sub

ElseIf txtname.Text <> "" And txtcp.Text <> "" Then
adodc1.RecordSource = "Select * from tablecoy where coyname like '" & txtname.Text & "*' and cperson like '" & txtcp.Text & "*'"
adodc1.Refresh
Exit Sub

ElseIf txtname.Text = "" And txtcp.Text = "" Then
adodc1.RecordSource = "Select * from tablecoy"
adodc1.Refresh
Exit Sub
End If

End Sub

what's wrong with my codes? pls help... thank you so much...