我刚才写错了应该是这样写的,
Adodc1.Recordset.Find "name = '" + txtName.Text + "'and  tel ='" + txtTel.Text + "'"

解决方案 »

  1.   

    实现查询后怎么才能让datagri中显示满足条件的记录
      

  2.   

    你为什么不用sql语言。很容易的。首先要给变量附值(就是你要查询的条件),然后用这个语句:select * from 表 where name='"& x1 &"'and tel='"& x2 "&'....执行查询就可以了。
      

  3.   

    我查询后datagrid中还是原来的那些数据,而不是我按条件查询的结果
      

  4.   

    strquery = "select * from fkxx where name='" & txtName.Text & "'and tel ='" & txtTel.Text & "'"
       Adodc1.RecordSource = strquery
       'Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
     为什么不好用