Connecting Tech Pros Worldwide Help | Site Map

Issues with repainting a MSGraph object

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 11th, 2006, 08:25 AM
Scott
Guest
 
Posts: n/a
Default 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


  #2  
Old March 11th, 2006, 12:05 PM
Linda Burnside
Guest
 
Posts: n/a
Default Re: Issues with repainting a MSGraph object

Have you tried

Me.MyGraph.Requery

??

Linda

"Scott" <sharrisct25@hotmail.com> wrote in message
news:1142068663.379164.25990@i40g2000cwc.googlegro ups.com...[color=blue]
>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
>[/color]


  #3  
Old March 11th, 2006, 09:55 PM
Br@dley
Guest
 
Posts: n/a
Default Re: Issues with repainting a MSGraph object

Scott wrote:[color=blue]
> 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[/color]

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


  #4  
Old March 12th, 2006, 07:15 AM
Scott
Guest
 
Posts: n/a
Default Re: Issues with repainting a MSGraph object

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

  #5  
Old March 12th, 2006, 08:55 AM
Br@dley
Guest
 
Posts: n/a
Default Re: Issues with repainting a MSGraph object

Scott wrote:[color=blue]
> 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[/color]

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


  #6  
Old March 12th, 2006, 04:55 PM
Scott
Guest
 
Posts: n/a
Default Re: Issues with repainting a MSGraph object

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.

  #7  
Old March 12th, 2006, 09:25 PM
Br@dley
Guest
 
Posts: n/a
Default Re: Issues with repainting a MSGraph object

Scott wrote:[color=blue]
> 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.[/color]

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

Br@dley


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.