Report Graph Object Error Message



I hope someone can help.

I am trying to use VBA to set the colors for the slices in a pie chart. My
problem is with accessing the object itself.

I am using the following code in a command button on a seperate form (Form1):

Dim myChart As Graph.Chart
Set myChart = Reports!Report2.Graph0.Object.Application.Chart

myChart.HasTitle = True
myChart.ChartTitle = "Aaron"

I am getting the error on click "Invalid Outside Procedure" and the problem
seems to be the Set statement. Any ideas what I am doing wrong?

Thanks,

Aaron

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200706/1

.


Quantcast