strSQL = " Select xx from table where xxx"
With Rs
Set .ActiveConnection = Adodc1.Recordset.ActiveConnection 'connect
'.CursorLocation = adUseClient
'.CursorType = adOpenStatic
rsTable.CursorLocation = adUseClient
strSQL = "select * from TableName"'TableName为你将要连接的表名
rsTable.Open strSQL, pubConn, adOpenDynamic, adLockOptimistic
if not rstTable.eof then
msgbox rstTable(0)
end if
End Sub
'引用Microsof ActiveX Data Objects 2.1 Library