From: dstiefe on
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