Set Chart RowSource programmatically.

  • Thread starter Thread starter Alan Z. Scharf
  • Start date Start date
A

Alan Z. Scharf

Hi,
I want to set the RowSource of an MS Graph pie chart on Access 2003 form
programmatically.

What is the syntac for that?

I got as far as : "With
Forms!frmTestForm![TestChart].Object.Application.Chart ......"

In Excel, it would be: " ActiveChart.SetSourceData Source:=Sheets("Pie
Chart").Range("A6:B9"), PlotBy _
:=xlColumns"

However, I'm having trouble translating that to Access form.

Thanks.

Alan
 
If the code is running in the form that contains the chart, just set the Row
Source property of the chart control:

Me.objChartControl.RowSource = "SELECT...."
 
Duane,

Thanks once again.

Alan


Duane Hookom said:
If the code is running in the form that contains the chart, just set the Row
Source property of the chart control:

Me.objChartControl.RowSource = "SELECT...."

--
Duane Hookom
MS Access MVP

Alan Z. Scharf said:
Hi,
I want to set the RowSource of an MS Graph pie chart on Access 2003 form
programmatically.

What is the syntac for that?

I got as far as : "With
Forms!frmTestForm![TestChart].Object.Application.Chart ......"

In Excel, it would be: " ActiveChart.SetSourceData Source:=Sheets("Pie
Chart").Range("A6:B9"), PlotBy _
:=xlColumns"

However, I'm having trouble translating that to Access form.

Thanks.

Alan
 
Back
Top