'Ctrl+t找Microsoft DataGrid Control....
'菜单"工程"->"引用" 找 Microsoft ActiveX Data Object....
Dim cn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim SqlStr As String
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Mode=ReadWrite"
SqlStr = "Select * From 社员 where 姓名 = '" & Text1.Text & "'"
rst.CursorLocation = adUseClient
rst.Open SqlStr, cn, adOpenDynamic, adLockOptimistic, adCmdText '打开记录集
Set DataGrid1.DataSource = rst '给DataGrid修改数据源