Microsoft KB Archive/132009

= ACC2: How to Create Fixed-Scale Charts in Reports/Forms =

Article ID: 132009

Article Last Modified on 11/6/2000

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q132009



SUMMARY
Advanced: Requires expert coding, interoperability, and multiuser skills.

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



MORE INFORMATION
To create a graph with fixed-scale values, follow these steps:

 Open the sample database NWIND.MDB, and create a report based on the Sales By Category query. If the Sorting And Grouping dialog box is not displayed, choose Sorting And Grouping from the View menu. In the Field/Expression box, select Category Name and set the GroupHeader property to Yes. If it is not displayed, choose Field List from the View menu, and drag the Category Name field to the Category Name header section. Set the detail section's Height property to 0. Click the Graph tool in the toolbox, and add a new graph to the Category Name header section. When the Microsoft Access Graph Wizard starts, follow these steps:

 Select the Queries option button. In the "Where do you want your graph to get its data?" box, choose the Sales By Category query, and then choose the Next button. Add Product Name and Product Sales from the Available Fields box to the Fields For Graph box, and then choose Next.</li> Select the Add (Sum) The Numbers option button, and then choose Next.</li> When prompted "Do you want to link the date in your graph to a field on the report?" choose the Yes button.</li> In the Fields On Form box, select Category Name. In the Fields In Graph box, select Category Name. Choose the <=> button.</li> When prompted "What type of graph do you want?" choose the horizontal bar graph (the first button in the second row), and then choose the Finish button.</li></ol> </li> Save the report as Report1 and then preview the report. For each category, you see a graph of the total sales per product. Note that the value scale of the horizontal axis varies from record to record.</li> View the Report1 report in Design view and double-click the graph object to open Microsoft Graph. In Microsoft Graph, double-click the horizontal axis to open the Format Axis Patterns dialog box. Choose the Scale tab.</li>  In the Format Axis Scale dialog box, remove the check mark from the first four Auto check boxes, type the following values, and then click OK:

<pre class="fixed_text">      Minimum: 0 Maximum: 45000 Major Unit: 5000 Minor Unit: 1000 </li> From the File menu, choose Exit and Return to Microsoft Access. When you are prompted whether you want to update the graph in Microsoft Access, choose Yes.</li> Preview Report1. In the graph for each category, you should see a consistent range of values from 0 to 450000 along the horizontal axis.</li></ol>

<div class="references_section">