Help with Graph

P

Penguin

I am using Access 97 and have a graph that charts my data. I am trying
to set the interior color of a series collection on the bar graph. I
am graphing on different years data. The series collection changes
each time. My question is how can I identify the series collection by
its name and not by its number. My code looks like this:

Dim MyChart As Object
Set MyChart = Me!Graph0

' This line does not work
MyChart.SeriesCollection("Carpet").Interior.Color = RGB(255, 0, 0)

' This line does work
MyChart.SeriesCollection(1).Interior.Color = RGB(255, 0, 0)

' This also does not work
MyChart.SeriesCollection(1).Interior.Color = RGB(255, 0, 0)
MyChart.SeriesCollection(2).Interior.Color = RGB(255, 255, 0)

Now the above code uses a color for the interior but I would like to
ultimately use the patterns or a custom pattern.

Any help??
 

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