Dim CNN As New ADODB.Connection, RST As New ADODB.Recordset
Set CNN = New ADODB.Connection
CNN.ConnectionString = "rovider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & "D:\ACCESS\BBB.mdb;"
CNN.CursorLocation = adUseClient
CNN.Open
Set RST = New ADODB.Recordset
RST.Open "SELECT * From T1;", CNN, adOpenKeyset, adLockOptimistic
Debug.Print RST.RecordCount