Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart Object Disappearing After Update

Status
Not open for further replies.

billschu

Technical User
Apr 3, 2001
38
US
Hello,

I have a chart control on a form (the standard/included chart control MSGraph.Chart.8) which allows the user to build line charts and interact with it in a variety of ways.

One of the features is a 'zoom' which allows the user to click on a section of the chart where they want to see more detail. The procedure for this will update the rowsource property of the chart (to another SQL statement with a narrower date range):

Form_Chart_Builder.Graph0.RowSource = strSQL

I also redo the tickmark & label spacing for the x axis:

Form_Chart_Builder.Graph0.Axes(xlCategory).TickLabelSpacing = lngAxisSpacing
Form_Chart_Builder.Graph0.Axes(xlCategory).TickMarkSpacing = lngAxisSpacing

This all works fine EXCEPT that the plotarea of the chart disappears. It seems like the plot area only and not the entire chart control, since the border is still visible. There are a number of ackward manual workarounds that I've found to get it to re-display such as clicking on the form's tab, right-clicking anywhere on the form, or clicking on another control on the form.

I've tried some code at the end of the procedure, none which worked.
- Form_Chart_Builder.Graph0.Requery
- Form_Chart_Builder.Graph0.Setfocus
- Form_Chart_Builder.Repaint
- Form_Chart_Builder.Requery

I have some other procedures that update the rowsource and x axis in a similar way, for instance to add another series to the chart, however it doesn't have the same problem. Main difference as far as I can tell is that the zoom requires the user to click ON the chart, whereas the add series is a command button in the ribbon.

Also should note that this is a problem on one computer but not another (both using same version of Access 2007).

Any help/advice would be greatly appreciated.

Thanks,
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top