Access Controls  «Prev  Next»

Lesson 6Adding a chart to a form
Objective Use the Chart Wizard to add a chart to a form.

Adding Chart to Access Form

Charts add a new dimension when you use them on your forms or reports.
Although they may seem kind of overwhelming at first, they are fairly straightforward when you use the Chart Wizard for a new form or the Chart option on the Insert menu for an existing form.
Chart Button

You can see an example of what a chart can look like in the figure display below:
Pie chart displaying specifications for network hardware

The chart displayed here is a simple pie chart, but there are 20 styles of charts to choose from. Once you have created a chart, you can modify various properties such as the way data values are displayed using Microsoft Chart directly from Access.
One of the things to keep in mind when creating forms with charts is that you will want to base them on queries rather than on tables directly. The reason for using queries versus tables that you can then set up the fields in the query to be a much closer match to the data that you want to display in the chart. For example, the query that the chart in the figure below is based on is called qryHoursByProjects.

qryHoursByProjects database where ProjectID is a foreign key in the Hours table.

Notice that only the fields necessary for display in the chart itself are included.
To see the steps for creating a new chart on a form using the wizard, you will use a modified version of the qryHoursByProjects query called qryHoursByProjectsForClientNo. This query can be seen here:

qryHoursByProjectsForClientNo: addition of the criteria requesting the client number (ClientNo)

The only modification is the addition of the criteria requesting the client number (ClientNo). While in the Forms list of the Database window, choose New.
In the next lesson, you will learn what ActiveX controls are and where you can use them.

Using Access Chart Wizard


Click the Exercise link below to see how to use the Chart Wizard.
Using Access Chart Wizard