In Access 2007 I have a report that contains a chart.
I need to be able to change the series of the report, because sometimes it can have one series, other times three.
What I have is the following:
Dim Rpt As Report
Dim grphChart As Graph.Chart
Dim recSource As String
DoCmd.OpenReport ReportName, acViewDesign
Reports(ReportName).graph0.RowSource = "qryDataSource"
Set Rpt = Reports(ReportName)
Set grphChart = Rpt(ChartObjectName).Object
grphChart.Activate
grphChart.SeriesCollection(0).Add
grphChart.SeriesCollection(0).Caption = "Series Number"
I keep getting an error 438 - object does not support this property or method
What I am doing wrong?
I need to be able to change the series of the report, because sometimes it can have one series, other times three.
What I have is the following:
Dim Rpt As Report
Dim grphChart As Graph.Chart
Dim recSource As String
DoCmd.OpenReport ReportName, acViewDesign
Reports(ReportName).graph0.RowSource = "qryDataSource"
Set Rpt = Reports(ReportName)
Set grphChart = Rpt(ChartObjectName).Object
grphChart.Activate
grphChart.SeriesCollection(0).Add
grphChart.SeriesCollection(0).Caption = "Series Number"
I keep getting an error 438 - object does not support this property or method
What I am doing wrong?