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.Color = 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.
Scott