ACC97: Graph 97 Chart Object Does Not Update Display Correctly

Last reviewed: November 11, 1997
Article ID: Q165836
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you add a graph to a report and link its data to a field in the report, the graph is not updated from one record to the next when you view or print the report.

CAUSE

Microsoft Access 97 is not requerying the LinkChildFields and LinkMasterFields properties in the chart object.

RESOLUTION

If the graph is based on a saved query, open that query in Design view; add the field displayed in the LinkMasterFields and LinkChildFields properties of the graph to that query.

If the graph is based on an SQL statement, move the field in the LinkMasterFields and LinkChildFields properties of the graph to a field with a WHERE clause in the graph's RowSource property. The following example shows you how to do this using the Sales By Category report in the sample database Northwind.mdb.

CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform these steps on a copy of the database.

  1. Start Microsoft Access 97 and open the sample database Northwind.mdb.

  2. Open the Sales By Category report in Design View.

  3. If the properties sheet is not already displayed, click Properties on the View menu.

  4. Select the graph in the CategoryName Header section of the report.

  5. Note that the graph's LinkChildFields property is set to CategoryID; this will become a new field in the graph's RowSource. Note that the graph's LinkMasterFields property is also set to CategoryID; this will be used as a WHERE clause in the graph's RowSource.

  6. Clear the LinkChildFields and LinkMasterFields properties.

  7. Using the right mouse button (right-click), click the graph's RowSource property, and then click Build on the shortcut menu that appears.

  8. In the Query Builder, drag the CategoryID field to the QBE grid. This represents the LinkChildFields property.

  9. Change the Total row of the CategoryID field from Group By to Where, and then type the following expression in the Criteria row:

    Reports![Sales by Category]![CategoryID]

    This represents the LinkMasterFields property.

  10. Close the Query Builder window and save the changes.

  11. Save the Sales By Category report, and then close it.

  12. Preview the Sales By Category report and note that the information in the graph corresponds to the Product and Sales data on each page of the report.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 97.

If the graph is based on an SQL statement, this behavior does not occur in Microsoft Access 97 Service Release 1. However, if the graph is based on a saved query and you are using Microsoft Access 97 Service Release 1, you must still add the field shown in the LinkChildFields and LinkMasterFields properties of the graph to the query.

NOTE: Stand-alone Microsoft Access 97 Service Release 1 is not currently available, but you can update your copy of Microsoft Access 97 to Service Release 1 by downloading Microsoft Office Service Release 1 from Microsoft's Web site at:

   http://www.microsoft.com/office/office97/servicerelease

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Microsoft Access 97 and open the sample database Northwind.mdb.

  2. Open the Sales By Category report in Design view.

  3. If the properties sheet is not already displayed, click Properties on the View menu.

  4. Select the graph object, and then clear its LinkChildFields and LinkMasterFields properties.

  5. On the File menu, click Print Preview. Note that the graph displays information for all products on each page of the report.

  6. On the View menu, click Design view.

  7. Select the graph object and reset its LinkChildFields and LinkMasterFields properties to CategoryID.

  8. On the File menu, click Print Preview. Note that the information in the graph corresponds to the Product and Sales data on each page of the report.

  9. Save the report and close it.

  10. Preview the Sales By Category report from the Database window. Note that the graph still displays information for all products on each page of the report, just as it did when you cleared the graph's LinkChildFields and LinkMasterFields properties.

REFERENCES

For more information about the LinkChildFields and LinkMasterFields properties, search the Help Index for "LinkChildFields property" or "LinkMasterFields property."

Keywords          : IntpGrph RptOthr kbui
Version           : 97
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbbug
Solution Type     : Info_Provided


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.