ACC97: Graph 97 Chart Object Does Not Update Display Correctly (165836)
The information in this article applies to:
This article was previously published under Q165836 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
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 uses the Sales By Category report in the sample database
Northwind.mdb to show you how to do this.
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.
- Start Microsoft Access 97 and open the sample database Northwind.mdb.
- Open the Sales By Category report in Design View.
- If the properties sheet is not already displayed, click Properties on
the View menu.
- Select the graph in the CategoryName Header section of the report.
- 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.
- Clear the LinkChildFields and LinkMasterFields properties.
- Using the right mouse button (right-click), click the graph's RowSource
property, and then click Build on the shortcut menu that appears.
- In the Query Builder, drag the CategoryID field to the QBE grid. This
represents the LinkChildFields property.
- 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.
- Close the Query Builder window and save the changes.
- Save the Sales By Category report, and then close it.
- 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: To update your copy of Microsoft Access 97 to Service Release 1,
download Microsoft Office Service Release 1 from Microsoft's Web site at
the following address:
REFERENCES
For more information about the LinkChildFields and LinkMasterFields
properties, search the Help Index for "LinkChildFields property" or
"LinkMasterFields property."
Modification Type: | Minor | Last Reviewed: | 12/1/2005 |
---|
Keywords: | kbdownload kbbug kbui KB165836 |
---|
|