VBA to display a pivot Chart

CoffeeGuru

Registered User.
Local time
Today, 19:04
Joined
Jun 20, 2013
Messages
121
Hi guys and gals

[I moved this from Macro to here as I think this is a better place for it]


I am probably going about this all wrong, so let's just call it a learning question.

I have a need to display a pivot chart by clicking a button on my menu screen. At the moment my button will just display the query results and if I then click on View/PivotChart View my chart displays.

I am going to stick my neck out here and say it's the bit in red that needs amending, but I could be wrong.

Code:
Private Sub Command316_Click()
DoCmd.OpenQuery "R06X - OOS Chart", [COLOR=red][B]avViewNormal[/B][/COLOR]
End Sub
 
Try..
Code:
DoCmd.OpenQuery "R06X - OOS Chart", acViewPivotChart
 
Thanks Paul,
That was just what I was looking for
 
Glad to be of help ! Not putting you down in any way, but when you start typing the Method, you should get the intellisense (a drop down sort of command listing all available parameters).. It should normally help you..
 
Maybe it was because I was changing it and didn't delete enough of the code. But thanks I will bear it in mind for next time.
 

Users who are viewing this thread

Back
Top Bottom