Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: How to Create Fixed-Scale Charts in Reports and Forms


View products that this article applies to.

This article was previously published under Q208633
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

↑ Back to the top


Summary

When you create a chart in Microsoft Access, Microsoft Graph automatically adjusts the scale of the value axis for each record. This means that the displayed range of values may vary from record to record. This article demonstrates how you can manually create a chart with consistent, fixed-scale values for every record.

NOTE: This article explains a technique demonstrated in the sample file, RptSmp00.mdb. For information about how to obtain this sample file, please see the following article in the Microsoft Knowledge Base:
231851� ACC2000: Microsoft Access 2000 Sample Reports Available in Download Center

↑ Back to the top


More information

To create a chart with fixed-scale values, follow these steps:
  1. Open the sample database Northwind.mdb.
  2. Create a blank report based on the Sales By Category query.
  3. On the View menu, click Sorting and Grouping to open the Sorting and Grouping dialog box.
  4. In the Field/Expression box, select CategoryName, and set the GroupHeader property to Yes.
  5. If the field list is not displayed, on the View menu, click Field List, and then drag the CategoryName and CategoryID fields to the CategoryName header section, and set the Visible property to No for the CategoryID field.
  6. Set the Height property of the detail section to 0 (zero).
  7. On the Insert menu, click Chart.
  8. Insert the chart in the group header section. When the Chart Wizard starts, follow these steps:
    1. Click to select the Queries button.
    2. On the Which table or query would you like to use to create your chart? screen, select the Sales By Category query, and then click Next.
    3. Add ProductName and ProductSales from the Available Fields box to the Fields For Chart box, and then click Next.
    4. On the What kind of chart would you like? screen, click the Bar Chart button, and then click Next.
    5. On the How do you want to lay out the data in your chart? screen, click Next.
    6. On the If you want the chart to change from record to record, select the fields that link the document to the chart screen, select CategoryId for both the report fields and the chart fields, and click Next.
    7. On the What title would you like for your chart? screen," click Finish.
  9. Save the report as Report1, and then preview the report. Note that for each category, you see a chart of the total sales per product.

    NOTE: The value scale of the horizontal axis varies from record to record.
  10. View the Report1 report in Design view and double-click the chart object to open Microsoft Graph.
  11. In Microsoft Graph, double-click the horizontal axis to open the Format Axis Patterns dialog box. Click the Scale tab.
  12. In the Format Axis Scale dialog box, click to clear the first four Auto check boxes, type the following values, and then click OK:
       Minimum: 0
       Maximum: 45000
       Major Unit: 5000
       Minor Unit: 1000
    					
  13. On the File menu, click Exit and return to Microsoft Report1: Report.
  14. Preview the Report1 report. Note that in the chart for each category, you see a consistent range of values from 0 to 450000 along the horizontal axis.

↑ Back to the top


References

For more information about creating a chart, click Microsoft Access Help on the Help menu, type charts, creating and inserting in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB208633, kbhowto

↑ Back to the top

Article Info
Article ID : 208633
Revision : 2
Created on : 6/28/2004
Published on : 6/28/2004
Exists online : False
Views : 302