PC Review


Reply
Thread Tools Rate Thread

Controling Microsoft Graph on vb via access report

 
 
Andrew Smith
Guest
Posts: n/a
 
      8th Sep 2003
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).


"Roy Goldhammer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Roy Goldhammer
Guest
Posts: n/a
 
      9th Sep 2003
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


 
Reply With Quote
 
Andrew Smith
Guest
Posts: n/a
 
      9th Sep 2003
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.

"Roy Goldhammer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?
>
> "Andrew Smith" <(E-Mail Removed)> wrote in message
> news:y_67b.4530$(E-Mail Removed)...
> > 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).
> >
> >
> > "Roy Goldhammer" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Roy Goldhammer
Guest
Posts: n/a
 
      10th Sep 2003
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?

"Andrew Smith" <(E-Mail Removed)> wrote in message
news:y_67b.4530$(E-Mail Removed)...
> 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).
>
>
> "Roy Goldhammer" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Microsoft Graph in an Access Report Van T. Dinh Microsoft Access 5 21st Dec 2007 04:53 PM
Convert Microsoft Graph 2000 Chart to Black and White in Access Report L Anthony Johnson Microsoft Access Reports 1 1st Dec 2004 08:19 PM
Setting Microsoft Graph on Access report Roy Goldhammer Microsoft Access Form Coding 1 21st Jul 2003 03:11 AM
Using Microsoft Graph in access report GVaught Microsoft Access External Data 2 20th Jul 2003 10:42 PM
Placing Microsoft Graph on Access report Roy Goldhammer Microsoft Access Form Coding 0 19th Jul 2003 07:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:57 AM.