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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report chart comes up with East West...sometimes 2

Status
Not open for further replies.

martyc32

Programmer
Feb 25, 2002
12
0
0
US
I have this function that queries data from a table, appends it to a temporary table and then draws a chart. Sometimes this works fine, but sometimes (About 50%) it comes up with the default chart data of east, west, north, and south on the bottom and does not have the data in it. Anyone know why this is doing this???
Thanks in advance!
 
Are you in Access 2000?
We found this bug and it got escalated finally to MS, who wrote a QFE for our company. I dont know if they ever incorporated the fix into a patch or not. Here, we run the query or table that the chart is based on, copy the resulting dataset, go into the design of the chart, and paste that into the datasheet of the chart design. that's so we can see better what it's going to look like so we can manipulate the format easier, etc. so you can see our problem: some office admin runs the charts for some manager, and if it comes up with the 'template' data, she doesnt know it because she's not really aware of what the charts should look like. but since the 'template' data is no longer 'north/south/east/west' it's not obvious that it's wrong.

anyhow, try this - it will refresh the charts on your report: put it in the Format property of the report DETAIL section: (in this example, your chart is named OLEUnbound0 which is the default name of a chart; you'll have to tweek if you've renamed your chart object)
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    'force update and refresh of graph object
    Dim objChart As Object
    Dim objGraphApp As Object
    Set objChart = Me.OLEUnbound0.Object
    Set objGraphApp = objChart.Application
    objGraphApp.Update
    objChart.Refresh
End Sub

mind you, we did still have the 'template' data problem after this, but only have seen it twice in the past year. before, as you said, it was definately 50% at least.
 
No, this is in Access 97, but probably the same error. Thanks for the response! I will try your code.
 
I have had a similar problem with a Graph in a group footer in Access 97. Sometimes it would display the correct graph, and sometimes it would display the graph for the previous group. This appears to have solved my problem. Thank you!
 
I struggled with this same problem for days before I came across this post. Ginger, your code works great!!! Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top