0
我试图在MS Access 2013中编写代码,该代码将根据系列值更改图表中每个条的颜色。数据存储在根据该组条件而变化的查询中。MS Access - 根据系列值更改条形图的颜色
在窗体中是组合框和列表框的女巫为查询设置条件。重新查询后,输出是一个图。
Private Sub listS_AfterUpdate()
Me.graph.Requery
Dim i
With graph
For i = 1 To .SeriesCollection.Count
If .SeriesCollection(i).Value < 0.78 Then
.SeriesCollection(i).Border.Color = RGB(255, 0, 0)
.SeriesCollection(i).Interior.Color = RGB(255, 0, 0)
Else
.SeriesCollection(i).Border.Color = RGB(0, 255, 0)
.SeriesCollection(i).Interior.Color = RGB(0, 255, 0)
End If
Next i
End With
End Sub
问题在于IF
声明:
If .SeriesCollection(i).Value < 0.78 Then
错误:
Object doesn't support this property or method
谁能帮我这个?
谢谢
谢谢您的重播。我实际上设法在Excel中编写了VBA中的代码,但是我无法使其在Access中运行。我不认为这种方法可以在Access中工作。 –