Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error on connection to recordset
Office 2003
I'm trying to obtain information from a query in Access from a Sub in Excel-VBA. The code follows. I receive an error message indicating that the recordset cannot be opened. Dim rngEmployees As Range Set rngEmployees = vacations.Range("vacations_names").Offset(1, 0) Dim rngEmpLastName As Range Set rngEmpLastName = vacations.Range("vacations_names").Offset(1, 1) Dim intColIndex As Integer Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source" & _ "=C:\Documents and Settings\oscar\Mis Documentos\aaa-oacm\" & _ "aaa-tech_projects\planillas_project\nomina.mdb;" rs.Open "tblEmployees, cn" rngEmployees.CopyFromRecordset rs Thank you in advance. Oscar |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
QueryTable connection using ADO Recordset | Excel Programming | |||
ADO Connection vs Recordset objects. | Excel Programming | |||
Disconencted recordset for DSN less connection | Excel Programming | |||
Connection Recordset Loop Problem with VBA - Help | Excel Programming | |||
VBA excel - problem with having clause in sql with adodb.connection/recordset | Excel Programming |