Pivot Table - identifying datasource

H

halemweg

I have an excel pivot table using a query from an access database as the
source. Worked great, including refreshing the data. Now I have a
problem because I had to change the structure of the underlying
database and didn't fix some of the querys yet. When I try to hange the
query I'm getting the error message: "This query can not be edite". On
OK I get the next message: "Too few parameters. Expected 1." I'm sure
that's because of my changes in the database structure. But my problem
is, that I don't know which query I used for the data. Is there anyway
to show which query was used????
Any help would be appreciated.
Juergen Amling
 
D

Debra Dalgleish

You can use a macro to show the query name. For example:

Sub PrintCommandText()
Debug.Print ActiveWorkbook.PivotCaches(1).CommandText
End Sub
 
Top