Set Con = CreateObject("ADODB.Connection" )
Con.open "DRIVER = {Microsoft Access Driver (*.mdb)};DBQ=D:\Testdb.mdb" ‘Open the connection
Set Record = CreateObject ("ADODB.Recordset" )
sql = "select * from InfoTab"
Record.open sql, con ‘execute the sql and get the result in the Record
If (not Record.eof) then
Record.MoveFirst
MsgBox Record(“Name”)
end if
Record.close
Set Record = Nothing
Con.close
Set Con = Nothing