Access 2007 - how to switch to pivot table view using vba code

Hi experts,

I have set up a query to open automatically in pivot table view, but when I open it using the docmd.openquery command in vba, it opens as a datasheet. Could you please tell me how to switch to pivot table view using vba code?

Thanks so much!!
JC_LivesAsked:
Who is Participating?
 
MeLindaJohnsonCommented:
docmd.openquery "queryname",acViewPivotTable
0
 
JC_LivesAuthor Commented:
thanks!!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.