Month: December 2010

  • Access Charts

    I have a problem when I use charts in Microsoft Access.  The chart won’t display its contents until I click on the chart and then click on something else (the record selector, blank space, another control, etc).  The charts are all designed to use an SQL query as their row source.  After clicking around a bit, the charts always display correctly.  I wish that the chart would display from the start, though.

    Scope:
    I have this problem when displaying charts in the header, detail, and footer sections of an unbound (no record source) form and when displaying charts in the header, detail, and footer sections of a bound form opened with an external filter.  I do not have this problem when the filter applied to a bound form comes from the form’s Properties-Data tab, or when the form has a record source but no filter.  I also do not have any problems displaying charts in a bound form that is unfiltered, nor in reports using identical charts (via copy/paste).

    Symptoms:
    To view the contents of a chart in one of the affected forms (see above), I must either move the focus to the chart (if the chart does not have the focus when the form is opened) or move the focus away from the chart (if the chart has the focus by default).  I usually accomplish this by clicking on the chart or the record selector, respectively.

    I have attempted using vba to move the focus around, refresh, repaint, and requery both the form and the chart.  None of these have fixed this problem, and a few searches for fixes online haven’t yielded any success.

     

    An example Row Source for a chart:

    • SELECT (Format([Date],”DDDDD”)),Avg([Cash]) AS Money FROM [RegisterLog]   GROUP BY (Int([Date])),(Format([Date],”DDDDD”));