Results 1 to 2 of 2
2004-09-02, 18:48 #1
- Join Date
- Nov 2001
- Atlanta, Georgia, USA
- Thanked 0 Times in 0 Posts
Conditional formatting of a chart in a report (Access2000)
I have a report with a chart that has one bar. I would like to vary the color based on the value.
90% to 100% would be green
75% to 89% would be yellow
0 to 74 % would be red
Is there a way to do that in a chart on a report.
I found some code that I've been playing with
Dim MyChart As Chart
Set MyChart = Me.chtResolution.Object
MyChart.SeriesCollection(1).Points(1).Interior.Col or = vbRed
I'm just trying to see if I can change it to red for right now, I can figure for the values later.
I've tried the chart in the header, detail, and footer
Placed the code in the OnFormat or OnPrint section and can't get it to work.
I'm referencing Microsoft Graph 9.0 Object Library.
this code came from a demo where it worked with a chart embedded in a form.
I attached the demo.
I either get a blank chart or this error:
Run-Time error 1004
Unable to get the Series Collection property of the Chart class.
Any ideas would be welcome.
2004-09-02, 20:17 #2
- Join Date
- Dec 2000
- Sacramento, California, USA
- Thanked 1 Time in 1 Post
Re: Conditional formatting of a chart in a report (Access2000)
Forms and reports work very differently. Reports are essentially static, so you have to make any changes *before* you open the report.Charlotte