'给你代码参考:
'比如说你要查询资料栏位"姓名"等于text1.text就显示在DataGrid
ADODC1.ConnectionString = "provider=Microsoft.jet.OLEDB.4.0;Persist security info= False; Data source=" & App.Path & "\数据库名称.mdb"
ADODC1.CommandType = adCmdText
ADODC1.RecordSource = “select * from 资料表名称 where 姓名 = '" & Text1.Text & "'"
ADODC1.Refresh
'设置DataGrid显示资料表里的资料
Set DataGrid1.DataSource =ADODC1
DataGrid1.Refresh
rs.open "select * from 表"...
Set DataGrid1.DataSource = rs