Use a query as the record source for a form or report

You can use a query to supply data to a form or report in Access. You can use a query when you create the form or report, or you can change an existing form or report by setting its Record Source property. When you set the Record Source property, you can either specify an existing query, or you can create a new query to use.

If you use a query as the record source, you might not be able to edit the data. Before you use a query as your record source, you should consider whether you need to edit data.

This article explains how to set the Record Source property for an existing form or report, and provides information about when you can and cannot edit query data.

This article does not explain how to create a form or a report. For help creating forms and reports, see the articles Create a form in Access and Create a simple report.

In this article

Use an existing query as the record source of a form or report

In Design view, set the Record Source property to an existing query that you want to use.

The Record Source property on the Data tab.

  1. Open the form or report in Design view. If the property sheet is not already open, press F4 to open it.
  2. In the property sheet, on the Data tab, click the Record Source property box.

Create a query as the record source of a form or report

In Design view, use the Build button (

) in the Record Source property box to create a new query to use as the record source.

  1. Open the form or report in Design view. If the property sheet is not already open, press F4 to open it.
  2. In the property sheet, on the Data tab, click the Record Source property box.
  3. Click

The Build button on the property sheet.

.

Editing data from a query

One of the main reasons you use forms is to enter and edit data. Some queries do not support data editing. Before you use a query as the record source for a form, you should consider whether you can edit the query data.

When can I edit data from a query?

You can edit the data from a query if:

Note: Even when you can edit data in a query, some of its fields may not be available for editing. Such cases are listed in the following section.

When can I not edit data from a query?

You cannot edit the data from a query when: