求助!datagrid控件显示查询的代码问题
adodc3已经连接了一个access数据库,然后要模糊查询,在text里面输入一个字母进行模糊查询,查询结果显示到datagrid3中去,但是一直无法运行,看不出来有什么毛病,初学者求解答!多谢多谢Private Sub Command3_Click()
Dim sql As String
Text5.Text = ""
sql = "select * from customer where customer_name like'%" & Text5.Text & "%'"
= adCmdText
Adodc3.RecordSource = sql
Adodc3.Refresh
Text5.Text = Adodc3.Recordset("customer_name")
Set DataGrid3.DataSource = sql
DataGridRows = sql.RecordCount
End Sub