|  | Chart objects |  | |
| | | Nick 'The Database Guy |  |
| Posted: Thu Aug 28, 2008 1:44 pm Post subject: Chart objects |  |
Hi All
I have inserted a Microsoft Graph Chart in one of my reports, it is a bar chart and has over 70 possible classification for the data to fit, not all of these classifications are used. What I want to know is how do I loop through each returned result and add the labels total and description to the chart? I would be grateful if some one could let me know as I am banging my head against a brick wall here.
OK, I thought that I had to loop through the ChSeries objects within ChSeriesCollection collection, some thing like this:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Dim Bar As Variant Dim MyChart As Variant Dim Bars As ChSeriesCollection Set MyChart.Name = Me.oleSpeciality For Each Bars In MyChart For Each Bar In Bars With Bar .HasSeriesName = True .HasValue = True End With Next Next End Sub
But when I try that Access gave me an error.
Thanks in advance
Nick |
| |
| | | Nick 'The Database Guy |  |
| Posted: Fri Aug 29, 2008 2:41 pm Post subject: Re: Chart objects |  |
| |  | |
On 28 Aug, 14:44, "Nick 'The Database Guy'" <nick...@btinternet.com> wrote:
| Quote: | Hi All
I have inserted a Microsoft Graph Chart in one of my reports, it is a bar chart and has over 70 possible classification for the data to fit, not all of these classifications are used. What I want to know is how do I loop through each returned result and add the labels total and description to the chart? I would be grateful if some one could let me know as I am banging my head against a brick wall here.
OK, I thought that I had to loop through the ChSeries objects within ChSeriesCollection collection, some thing like this:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Dim Bar As Variant Dim MyChart As Variant Dim Bars As ChSeriesCollection Set MyChart.Name = Me.oleSpeciality For Each Bars In MyChart For Each Bar In Bars With Bar .HasSeriesName = True .HasValue = True End With Next Next End Sub
But when I try that Access gave me an error.
Thanks in advance
Nick
|
There were two errors that I got, they were either 424 - "Object required", or 3251 - "Operation is not supported for this type of object"
I keep trying different permutations but they all seem to cause one of these errors!
TIA
Nick |
| |
|
|