Private Sub Command1_Click() Adodc1.RecordSource = "select * from [你的表名] where 手机='" & Text1.Text & "'" Adodc1.Refresh End Sub
Private Sub Form_Load() sqlstr = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=false;Data Source=你的mdb数据库地址" Adodc1.ConnectionString = sqlstr Adodc1.RecordSource = "select * from [你的表名]" Adodc1.Refresh Set DataGrid1.DataSource = Adodc1 End Sub