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
-
Open the table by double-clicking it in the Navigation Pane.
-
Scroll horizontally to the rightmost column in the table, and click the Click to Add column heading.
-
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.
-
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 (=).
-
Click OK.
Access adds the calculated field, and then highlights the field header so that you can type a field name.
-
Type a name for the calculated field, and then press ENTER.
For more information about creating expressions, see the article Create an expression.
Modify a calculated field
-
Open the table by double-clicking it in the Navigation Pane.
-
Click on the calculated field that you want to modify.
-
On the Fields tab, in the Properties group, click Modify Expression.
Access displays the Expression Builder.
-
In the expression box, make the necessary modifications to the calculation.
Note: It is not necessary to precede the expression with an equal sign (=).
-
Click OK.
No comments:
Post a Comment