Chart objects

  • Thread starter Nick 'The Database Guy'
  • Start date
N

Nick 'The Database Guy'

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
 
N

Nick 'The Database Guy'

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top