Unanswered: Cross-Tab/Pivot Excel Vba Headings problem
I have a problem with getting columns to transfer from my vba cross-tab query into excel. Here's my statement:
IndexRec.Open "Transform sum(total_dollars) As SumOftotal_dollars Select salesagent from [MyTable] Where (city = 'New York' Group by salesagent PIVOT date", Conn
All of the data comes in just fine when I use CopyFromRecordset, except for the date column. I need to do several queries, and I want the statement to return the actual dates for each city accross the top. Each city has a different amount of dates and may skip dates, so I don't want to use IN to generate the headings. Is there something in need to add?