Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010

    Unhappy Unanswered: Trouble requerying MS Graph 2000 charts in Access 2000

    Hi all,

    My basic question is: Why won't my graph update?

    My less basic question is:

    I have an access form with a MS Graph 2000 chart object on it. The chart object has a SQL Pass-through query as a row source. The query gets its data from two SQL tables.

    I have a button on the form that runs a bunch of VBA code that, among other things, updates/inserts a row in one of the tables the query uses. I want my chart to update and show this new row as soon as this change is made - so I used MyForm.MyGraph.Requery in the code, but it did nothing.

    I know the new row exists: DoCmd.OpenQuery "rowSourceQuery" just before the MyForm.MyGraph.Requery call shows me it's there. I'm sure I'm requerying the right graph object. The graph will refresh to show the new value when I move the form window, scroll my scroll wheel, click on the form or set a breakpoint and step through the code, but not when I call Requery.

    Does anyone have any ideas on what I might be missing?

    Cheers in advance
    - LMF

  2. #2
    Join Date
    Jul 2004
    South Dakota
    Just a shoot in the dark but have you set the UpdatedOptions to acOLEUpdateAutomatic. Search Help and see if it fixes it. Also, have you tried using Refresh?


  3. #3
    Join Date
    Mar 2010
    Yeah, Update Options is set to Automatic in the design properties of the chart object.
    Using Refresh at the same place in the code as I had the Requery statement makes the graph turn blank. It seems like that might indicate something, but I don't know enough about the subject to hypothesise.

    While testing I put a subform on the form that displayed all rows of the graph's source query so I could see if the same thing happens to any display of this particular query. The subform updates automatically exactly when I expect it to, without me having to requery it - the graph doesn't.
    Last edited by LMF; 03-04-10 at 19:13.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts