About making changes to a chart in a form or report
When you edit a chart, you can either make changes to the look of the chart or the data used to create it.
To change the look of the chart, you can change the size of the chart on the form or report or you can change the appearance of the chart with Microsoft Graph. For example, with Graph, you can change the location of the parts of the chart (such as the legend), the text format, the colors and patterns, and the axis scaling.
To change the data used to create the chart, you can modify the underlying table or other record source, or the query in the RowSource property.
When you use the Chart Wizard to create a chart that displays data from Microsoft Access, you choose the table or other record source that includes the fields that are displayed in the chart. This underlying table or other record source contains the data, such as sales figures or customer lists. After you have finished making selections in the Chart Wizard, Access creates a query in the RowSource property, which is based on the underlying table or other record source. The query in the RowSource property reflects the choices you made in the Chart Wizard to restrict the data, such as a range of dates or orders from a specific region.
For example, if you notice that the sales figures in your chart are wrong, the problem may be in the data stored in the underlying table, or in the design of the underlying record source. In this case, correct the underlying table or other record source. However, if you left out a field that you want to appear in your chart, either you can use the Chart Wizard to create the chart again or you can edit the query in the RowSource property.
Note In a Microsoft Access project, you can't use the Chart Wizard, but you can add a chart by inserting the Microsoft Graph Chart object (Insert menu, Object command).
Add a chart to a form or report
When you use the Chart Wizard to create a chart, it uses data you specify to determine whether it should create a global chart that shows all fields, or a record-bound chart that shows only the data in the current record as you move from record to record. If the Chart Wizard creates a global chart, and you want a record-bound chart, you can link the chart to a specific record. To use the Chart Wizard, you must have Microsoft Graph.
Note In a Microsoft Access project, you can't use the Chart Wizard, but you can add a chart by inserting the Microsoft Graph Chart object (Insert menu, Object command).
Add a new chart
- Open the form or report in Design view.
- On the Insert menu, click Chart.
If you create a lot of charts, you may want to add the Chart
button to the toolbar.
How?
Note You can add the Chart button to a toolbar in Design view of a form or report only in a Microsoft Access database, not a Microsoft Access project.
- Switch to the appropriate view, and make sure the toolbar you want to put the Chart button on is displayed.
- Right-click anywhere on the toolbar, and then click Customize on the shortcut menu.
- Click the Commands tab.
- In the Categories box, click Toolbox.
- Drag the Chart
button from the Commands box to the toolbar on which you want it to appear.
On the form or report, click where you want to place the chart.
- Follow the instructions in the Chart Wizard, which creates the chart based on available tables or other record sources and the fields you select.
Note At least one of the fields must have a data type that stores only numbers, such as Currency.
- Switch to Form view or Print Preview to see the chart with current data.
Note In a Microsoft Access project, you can't use the Chart Wizard, but you can add a chart by inserting the Microsoft Graph Chart object (Insert menu, Object command).
Create a record-bound chart from a global chart by linking it to a specific record
- Open the form or report in Design view.
- Make sure the chart is selected, and then click Properties
.
- In the LinkChildFields and LinkMasterFields property boxes, type the name of a field that appears in the RowSource property box and uniquely identifies each record, such as a primary key.
The values in these property boxes must match record for record the values in a field in the underlying table or other record source for the form or report. For example, suppose the form's underlying table includes the ProductID field. You want to link your chart on this field, so you type ProductID in the LinkChildFields and LinkMasterFields property boxes.
- To see whether your chart displays only the data for the current record, display the form in Form view, or look at the report in Print Preview.
Add an existing chart
Use this procedure to add an existing chart that was created in another Microsoft Access database or another program. When you do this, you will not be able to change the chart by changing data in your database.
- Open the form or report in Design view.
- Click Unbound Object Frame
in the toolbox.
- On the form or report, click where you want to place the chart.
- In the Insert Object dialog box, click Create From File, and then specify a path to the file. If you don't know the path, click Browse.
- If you want to link rather than embed the chart, select the Link check box.
- Select the Display As Icon check box if you want the chart to appear as an icon.
Change the look of a chart in a form or report
Change the size of a chart
- Open the form or report in Design view.
- Click the chart.
- Move the mouse pointer over any of the sizing handles until the pointer becomes a double-headed arrow.
- Drag the handle to where you want the edge of the object to be, and then release the mouse button.
Change the appearance of a chart
- Open the form or report in Design view.
- Double-click the chart to open Microsoft Graph.
- Make the changes you want.
For information about using Graph, click Microsoft Graph Help on the Help menu.
- When you finish editing, click Exit on the Graph File menu.
- When the application prompts you to update the object, click Yes.
Note Although you can change the data that appears in your chart by editing the datasheet in Graph, changes to the data as well as some formatting changes will be overwritten by Microsoft Access. To change the data that is displayed in your chart, you should change the underlying table or other record source, or the query in the RowSource property.