Sub ADO_Conn()
Dim conn As New Connection
Dim rs As New Recordset
strcon = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\sample.accdb;" & _
"User Id=admin;Password="
conn.Open (strcon)
qry = "SELECT * FROM sampletbl"
rs.Open qry, conn, adOpenKeyset
Msgbox rs(0)
rs.Close
conn.Close
End Sub
VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts