ACC1x: Creating Fixed-Scale Graphs in Forms and Reports (1.x)

ID: Q109737


The information in this article applies to:


SUMMARY

When you create a graph in Microsoft Access version 1.x, Microsoft Graph version 3.0 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 to create a graph with consistent, fixed- scale values for every record.


MORE INFORMATION

The following steps demonstrate how to create a graph with fixed-scale values:

  1. Open the sample database NWIND.MDB.


  2. Create a new blank report based on the Sales By Category query.


  3. From the View menu, choose Sorting And Grouping. In the first cell of the Field/Expression column, select Category Name, and then set the GroupHeader property to Yes.


  4. From the field list, drag the Category Name field to the Category Name header section.


  5. Set the Height property of the Category Name section to 2 inches.


  6. Set the Height property of the Detail section to 0.


  7. From the Toolbox, choose the Graph tool and create a new graph in the empty area below the Category Name field in the Category Name header section.


  8. In the "Which type of graph do you want?" box, select Sales By Category as the data source. Choose the horizontal bar graph button (top row, second from the left). Make sure the Sum option button is selected, then choose the Next button.


  9. In the "Which fields contain the data you want to graph and use for labels?" box, select Product Name and choose the ">" button. Then, select Product Sales and choose the ">" button. Choose Next.


  10. In the "Link the graph to the report?" box, choose Yes.


  11. In the "Which field(s) will link the graph to the form?" box, make sure Category Name is selected in both the Form Fields and Graph Fields boxes, then choose the "<=>" button. Choose Next.


  12. In the "What title do you want for your graph" box, choose the Design button.


  13. Save the report as Report1 and then preview it. Note that for each category you see a graph of the total sales per product, and that the value scale of the horizontal axis varies from record to record.


  14. View the report in Design view and then double-click the graph object.


  15. In Microsoft Graph, double-click the horizontal axis to open the Axis Patterns dialog box. Choose the Scale button.


  16. In the Format Axis Scale dialog box, clear the following check boxes and enter the following values, then choose OK:
    
           Minimum: 0
           Maximum: 45000
           Major Unit: 5000
           Minor Unit: 1000 


  17. From the File menu, choose Exit And Return To Microsoft Access. When you are prompted to update the graph in Microsoft Access, choose Yes.


  18. Preview Report1. Note that in the graph for each category you see a consistent range of values from 0 to 450,000 along the horizontal axis.



REFERENCES

Microsoft Graph "User's Guide," version 3.0, Chapter 3, "Formatting the Axis Scale," pages 87-92


Keywords          : kbtool IntpGrph 
Version           : 1.0 1.1
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: April 2, 1999