Tuesday, January 24, 2017

Add a calculated field to a table

Add a calculated field to a table

In Access 2010, you can create table fields that calculate values. The calculations can include values from fields in the same table as well as built-in Access functions.

Notes: 

  • The calculation cannot include fields from other tables or queries.

  • The results of the calculation are read-only.

In this article

Create a calculated field

Modify a calculated field

Create a calculated field

  1. Open the table by double-clicking it in the Navigation Pane.

  2. Scroll horizontally to the rightmost column in the table, and click the Click to Add column heading.

  3. In the list that appears, click Calculated Field, and then click the data type that you want for the result.

    Access displays the Expression Builder.

  4. Begin typing the calculation that you want for this field, for example:

    [Quantity] * [Unit Price]

    Note:  It is not necessary to precede the expression with an equal sign (=).

  5. Click OK.

    Access adds the calculated field, and then highlights the field header so that you can type a field name.

  6. Type a name for the calculated field, and then press ENTER.

For more information about creating expressions, see the article Create an expression.

Top of Page

Modify a calculated field

  1. Open the table by double-clicking it in the Navigation Pane.

  2. Click on the calculated field that you want to modify.

  3. On the Fields tab, in the Properties group, click Modify Expression.

    Access displays the Expression Builder.

  4. In the expression box, make the necessary modifications to the calculation.

    Note:  It is not necessary to precede the expression with an equal sign (=).

  5. Click OK.

Top of Page

No comments:

Post a Comment