you should create a object for "adodb.connection" not "Odbc.connection"
anyways following code should solve your problem..
anyways following code should solve your problem..
Code:
Set conn = CreateObject("adodb.connection")
Set rec = CreateObject("adodb.recordset")
conn.Provider = "microsoft.jet.oledb.4.0"
conn.Open "specify path of your access database file here"
rec.Open "specify your query here", conn
