Lessons Logo

Types of Charts


Bar Charts

Like the Column, the Bar chart is used to compare values of the same category on a common scale. This time, the chart is drawn horizontally. You create a Bar chart using the same process as the Column, except that you should select the Bar in the second page of the wizard.

In the following chart, we will see the frequent number of scoops that customers order.

In the following exercise, we are referring to an issue that has not been introduced previously. The reason is that we are going to ask you to use a function that cannot be explained at this time. The function we want you to use is called Choose(). We will explain it when we get to the functions and expressions. The problem is that, the chart we want to create is completely based on numbers from the Scoops column. If we just use the number, Microsoft Access "thinks" that we want to use a sum of the scoops and create a chart from it. Instead, we want to get a sum of scoops by categories. That is, we want to know the number of 1 scoop, or the number of 2 scoops, or the number of 3 scoops.

Therefore, in our own defense, here is what we propose to you. Since the following exercise is for demonstration purposes, you can skip it and you will not loose anything. Otherwise, simply do the exercise and trust us as you have done so far.


Practical Learning: Creating a Bar Chart

  1. To create a new query, on the main menu, click Insert -> Query and, in the New Query dialog box, double-click Design View

  2. In the Show Table dialog box, double-click CustomersOrders and click Close

  3. In the CustomersOrders list, double-click Scoops and press Tab. That will put the caret in the second column

  4. In the second column, type 
    NumberOfScoops: Choose([Scoops], "One", "Two", "Three")

    and press Enter

  5. Save the query as TypesOfScoops

  6. Switch the query to Datasheet View to preview it. Then close it

  7. To create a new chart, on the main menu, click Insert -> Form

  8. In the New Form dialog box, click Chart Wizard and, in the bottom combo box, select TypesOfScoops and click OK

  9. In the first page of the Chart Wizard, in the Available Fields list, double-click NumberOfScoops to include it in the Fields For Chart list:

  10. Click Next

  11. In the second page of the Chart Wizard, click the chart in the 1st column - 2nd row Bar Chart

  12. Click Next twice

  13. Set the Title to Number of Scoops/Order and click Finish

  14. Save the form as chtNumberOfScoopsPerOrder

  15. After viewing the chart, print then close the form





Previous Copyright 2002-2005 FunctionX, Inc. Next