Controling Microsoft Graph on vb via access report

A

Andrew Smith

It depends on exactly how much you need to control.

To just change the data, but keep all the chart settings constant, you can
just change the RowSource property of the object frame that holds the chart.

To get full control over the chart (eg chart type, display/ hide legend,
change colours etc) then you need to add a reference to the Microsoft Graph
Object library, and declare a module level graph object in the form that
contains the graph. In the load event of the form you can then instantiate
the object using code such as:

Set objGraph = Me.ctlChart.Object

(objGraph is the name of the graph object and ctlChart is the name of the
object frame).

You can then use vba to work with the various properties of the chart
object. The object model is described in the file vbagr10.chm (for version
10, Office XP).
 
R

Roy Goldhammer

Hello there

I've add unbound object frame to access report and set that the object will
be microsoft graph.

Now i want to control it by vb.

How can i do this?

any help would be useful
 
A

Andrew Smith

Sorry, I did not read your message properly. What I put works for a form,
but not a report it seems. I'm not sure I can be of any more help.
 
R

Roy Goldhammer

Well Andrew

I use Access 2000 as ADP and i set the grapg on Report an not on form.

I use Store prosedure as row source.

I have two problems that i need to solve so for them i need to control the
graph on access

1. The data on msGraph not always been updated. THere are cases that the
graph present the data that it have and not the data on the rowSource
property.

2. On pie graph sometimes the pie labels are placed on on another.

The solution for this is to place the labels another place on the screen so
the graph will be more conftible.

I've tried the connection the code that you gave me

and here is the error i got: 2771 Object frame you tried to edit does not
OLE Object.

Can you help me on it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top