473,388 Members | 1,230 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Issues with repainting a MSGraph object

I have a unbound MS graph object built as a pie chart that I set to a
value list and I am updating programatically. Everything works except
that the graph does not repaint except for when the entire subroutine
is completed.

I launch the sub from a command button on the same tab as the graph
object. I have tired to force a requery of the msgraph, a refresh of
the form and even a repaint of the form. I have put in waits and
msgboxs to see if it is a timing / load issue. No luck I simply can
not get the chart to update until I exit the subroutine back to the
form.

Any ideas? Any events I am missing?

Thanks

Mar 11 '06 #1
6 4307
Have you tried

Me.MyGraph.Requery

??

Linda

"Scott" <sh*********@hotmail.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
I have a unbound MS graph object built as a pie chart that I set to a
value list and I am updating programatically. Everything works except
that the graph does not repaint except for when the entire subroutine
is completed.

I launch the sub from a command button on the same tab as the graph
object. I have tired to force a requery of the msgraph, a refresh of
the form and even a repaint of the form. I have put in waits and
msgboxs to see if it is a timing / load issue. No luck I simply can
not get the chart to update until I exit the subroutine back to the
form.

Any ideas? Any events I am missing?

Thanks

Mar 11 '06 #2
Br
Scott wrote:
I have a unbound MS graph object built as a pie chart that I set to a
value list and I am updating programatically. Everything works except
that the graph does not repaint except for when the entire subroutine
is completed.

I launch the sub from a command button on the same tab as the graph
object. I have tired to force a requery of the msgraph, a refresh of
the form and even a repaint of the form. I have put in waits and
msgboxs to see if it is a timing / load issue. No luck I simply can
not get the chart to update until I exit the subroutine back to the
form.

Any ideas? Any events I am missing?

Thanks


Are you using MyChartObject.Update at the en of your changes?

I also had the same problem. I found that you had to force the focus to be
on the graph object after working on it.

SetupChart Me![MyGraph], Me![ChartID] 'your code that sets up the chart
Me![MyGraph].SetFocus 'force the focus to be on the chart

It worked for me.
--
regards,

Br@dley
Mar 11 '06 #3
Ok I was using the MsGraph.Requery method I tried creating a object
reference and using the update method I tried DoEvents and I am a bit
at a loss here.

Interestingly if I put a breakpoint in the code of the command button
that controls the pie chart it actually is updated when I flip back to
the form from the VB editor. But without the breakpoint the chart does
not show until all the code in the button is completed (the graph is
rebuilt about 6 times during this code). I even tried some MsgBoxes
instead of the breakpoint in the code and the chart is not refreshed
when the MsgBox is displayed.

Can anyone think what is special about the breakpoint versus other
interupts like a msgbox etc. Somehow that must be linked to what I
need to solve this.

Thanks

Mar 12 '06 #4
Br
Scott wrote:
Ok I was using the MsGraph.Requery method I tried creating a object
reference and using the update method I tried DoEvents and I am a bit
at a loss here.

Interestingly if I put a breakpoint in the code of the command button
that controls the pie chart it actually is updated when I flip back to
the form from the VB editor. But without the breakpoint the chart
does not show until all the code in the button is completed (the
graph is rebuilt about 6 times during this code). I even tried some
MsgBoxes instead of the breakpoint in the code and the chart is not
refreshed when the MsgBox is displayed.

Can anyone think what is special about the breakpoint versus other
interupts like a msgbox etc. Somehow that must be linked to what I
need to solve this.

Thanks


Did you try setting the focus to the graph object after your code has
finished? Works for me.

Me![myGraph].Setfocus

Took me ages to discover that solution.
--
regards,

Br@dley
Mar 12 '06 #5
Unfortunatly yes, I have added that to my code as to your previous
select. It is almost line the refresh is getting suspended, delayed or
prevented by the rest of my code until there is a interupt like a
breakpoint of the code is finished.

Mar 12 '06 #6
Br
Scott wrote:
Unfortunatly yes, I have added that to my code as to your previous
select. It is almost line the refresh is getting suspended, delayed
or prevented by the rest of my code until there is a interupt like a
breakpoint of the code is finished.


Maybe post your code....
--
regards,

Br@dley
Mar 12 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andre Kristoffersen | last post by:
Hi! I have found the MSGraph object very easy to use in Access if you use it in a straightforward manner. Just by changing the object rowsource ( I use sql), the graph changes accordingly. ...
3
by: jcrouse | last post by:
I have created a form designer type application (with a lot of you peoples helpJ). It has label controls that are draggable at runtime. The user is also allowed to change some properties such as...
0
by: StepHenHairNet | last post by:
I have a problem with MS Graph which I wonder if anyone can help me with. I have built an application in VB.Net, using a WebBrowser control to act as an pseudo OLE container for the Graph Object,...
0
by: Greg | last post by:
Anyone having issues with their object datasources appearing and vanishing from the datasource browser? I create an object for binding as a datasource in my App_Code folder, compile my web...
3
by: Doudou | last post by:
Hello, First I'm french, so my english isn't very good. I try to find explanation or example to use MsGraph object directly in VB.NET application (in a windows form for example). Is it...
0
by: blurbology | last post by:
I have a word document that contains a Graph (MSGraph). I am trying to update the Chart's datasheet with new values, but I cannot seem to get the correct reference for the chart object. What I am...
2
by: LucasLondon | last post by:
Hi, I'm trying to use VBA to extract underlying data from charts in powerpoint to excel, i.e from the underlying powerpoint datasheet that feeds the chart. I've found the macro below on the...
11
by: truezplaya | last post by:
Hi I have an issue with a list box. I populate the list box using listbox1.datasource = myCollectionOfCars listbox1.databind() When i go to retrieve the selected item from the listbox...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.