Graphs in Reports

SBM

Registered User.
Local time
Yesterday, 16:14
Joined
Aug 16, 2004
Messages
30
Can anyone help ? I have a graph in a report which uses data from a table. This table is refreshed with the last 30 days data each time the graph is requested (before the graph opens). However, sometime the graph displays old data even though the table to which it is linked contains the correct data. It is as if the graph is a picture rather than a linked graph. (Update option already set to Automatic)

By opening the Report in design view and "messing about" (not changing anything in particular but just selecting the same options on some properties) this re-activates the graph and it picks up the correct data.

How can I ensure the graph shows the current data ?
 
If you search on here you should find some code to refresh the chart. I have had this problem too....can;t rememer the code though!...i'll have a look in my files!
 
I've had the same problem with Graphs in MsAccess 97.

It seems to be something to do with the PC being to fast!! :)

I found that putting 'me.requery' in the 'onformat' event fixed it in most cases

All I can say is, try this first as it's a quick and easy thing to do.

Brett
 
I've also found this:

Credit goes to Duane Hookem on www.dbforums.com

There are some tips at http://ourworld.compuserve.com/homepages/attac-cg/.
Code sample from their site:

Add the following Visual Basic code to the On Print event of the section of
the report that contains the Graph object.

On Error Resume Next
Dim objGraph As Object
Set objGraph = Me!TheNameOfYourGraph.Object
objGraph.Refresh
DoEvents
Set objGraph = Nothing

Hope this helps

Brett
 

Users who are viewing this thread

Back
Top Bottom