ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   creating a pivot with external data source (from access) (https://www.excelbanter.com/excel-programming/442751-creating-pivot-external-data-source-access.html)

dstiefe

creating a pivot with external data source (from access)
 
I am able to copy the records of a table to a recordset...see below

know I'm wondering how i can up that in a pivot table? I've only written
code when the data resides in an excel sheet

Thank you

this is my code to get the dataset from Access...

Sub GetAccessData()
Dim sh As Worksheet

Set sh = Sheets("Sheet2")

Dim MyConnect As String

Dim MyRecordset As ADODB.Recordset

MyConnect = "Provider=Microsoft.ACE.OlEDB.12.0;" & _
"Data Source = C:\Dans_DB.accdb"

Set MyRecordset = New ADODB.Recordset

MyRecordset.Open "DMA", MyConnect, adOpenStatic, adLockReadOnly


All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com