RandomCoder
New member
- Local time
- Today, 06:48
- Joined
- Nov 1, 2012
- Messages
- 7
[SOLVED] PivotChart form adding new series with VBA
I had hoped that my first post would be a solution on how to utilise the OWC10 chartspace component but I've run into problems that I'm seemingly unable to resolve.
I've exhaust all the web resources I can find and overcome many problems such as using OWC10 instead off OWC11 as it doesn't appear to play nicely with Access 2003 when explicitly declared (if not explicitly declared then the intelisense feature doesn't work!).
Anyway, please the the attached example of what I have achieved so far. If you open the frmMaintAnalysis form I am wanting to add another data series to the existing one, which can easily be accomplished using the mouse by...
One useful tip that I've learnt whilst trawling the web is that changing the pivotforms record source has the effect of wiping the chartspace and so I do this when the form loads. I then set the chartspace data using setdata method but after that I'm unable to add any other data. If I select literal data instead of bound data then the series is added but with no values showing.
Am I being really stupid, as I feel that the answer is staring me in the face but I'm unable to see it? I'm posting here out of desperation, please kindly offer me some advice, it will save me even more hair loss!
Thanks in advance,
RandomCoder
PS. This is a work in progress, the code still needs some tidying up!
I had hoped that my first post would be a solution on how to utilise the OWC10 chartspace component but I've run into problems that I'm seemingly unable to resolve.
I've exhaust all the web resources I can find and overcome many problems such as using OWC10 instead off OWC11 as it doesn't appear to play nicely with Access 2003 when explicitly declared (if not explicitly declared then the intelisense feature doesn't work!).
Anyway, please the the attached example of what I have achieved so far. If you open the frmMaintAnalysis form I am wanting to add another data series to the existing one, which can easily be accomplished using the mouse by...
Right clicking in the chart area.
Select field list
Then drag the "Breakdowns_Elec" field into the chart.
Simples (but not for some of my users)!
But how to achieve this using VBA? I'd like to use the "Add" button to add another series to the chart, selected using the combobox. I've spent a week getting this far as the web components help is enough to drive a person insane.Select field list
Then drag the "Breakdowns_Elec" field into the chart.
Simples (but not for some of my users)!
One useful tip that I've learnt whilst trawling the web is that changing the pivotforms record source has the effect of wiping the chartspace and so I do this when the form loads. I then set the chartspace data using setdata method but after that I'm unable to add any other data. If I select literal data instead of bound data then the series is added but with no values showing.
Am I being really stupid, as I feel that the answer is staring me in the face but I'm unable to see it? I'm posting here out of desperation, please kindly offer me some advice, it will save me even more hair loss!
Thanks in advance,
RandomCoder
PS. This is a work in progress, the code still needs some tidying up!
Attachments
Last edited: