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

  1. Open the form or report in Design view.
  2. 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.

    1. Switch to the appropriate view, and make sure the toolbar you want to put the Chart button on is displayed.
    2. Right-click anywhere on the toolbar, and then click Customize on the shortcut menu.
    3. Click the Commands tab.
    4. In the Categories box, click Toolbox.
    5. Drag the Chart button from the Commands box to the toolbar on which you want it to appear.

  3. On the form or report, click where you want to place the chart.

  4. 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.

  5. 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

  1. Open the form or report in Design view.
  2. Make sure the chart is selected, and then click Properties .
  3. 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.

  4. 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.

  1. Open the form or report in Design view.
  2. Click Unbound Object Frame in the toolbox.
  3. On the form or report, click where you want to place the chart.
  4. 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.
  5. If you want to link rather than embed the chart, select the Link check box.
  6. Select the Display As Icon check box if you want the chart to appear as an icon.