I have created a pivot table from an ADO recordset using VBA. The pivot table is created and everything seems normal. However when I start adding row or column fields, the title cells display in the sheet, but not the individual records. They records will not appear until I add a datafield to the Values area, then everything works properly. if you remove the datafield, all data in the table, except the titles, disappears. Any help would be greatly appreciated. Below is the code that assigns the recordset to the pivot cache.
Set pvtCache = ActiveWorkbook.PivotCaches.Add(xlExternal)
Set pvtCache.Recordset = myRecordSet
Set pvtTable = pvtCache.CreatePivotTable(ActiveSheet.Range("c3"), "Exhibit")
Thanks.
Set pvtCache = ActiveWorkbook.PivotCaches.Add(xlExternal)
Set pvtCache.Recordset = myRecordSet
Set pvtTable = pvtCache.CreatePivotTable(ActiveSheet.Range("c3"), "Exhibit")
Thanks.