Calculated Fiields

  • Thread starter Thread starter Spiderman
  • Start date Start date
S

Spiderman

Can a field in Access be setup as a calculated field the way it can in
Excel? For example, can a field named Total Expenses be setup to calculate
the sum of fields Expense1 and Expense2 in each record? I see that the table
designer allows you to set a default value for a field but no way to
calculate the value using other fields in the table.
 
Depends. You cannot (and should not) create a field in a table that does
such a calculation (it would be a violation of database normalization
principles, one of which states that fields in a table should not be totally
dependent on other fields in the same row, therefore Access doesn't allow
it).

However, you can create a query that does the calculation for you (just add
an expression like TotalExpenses: [Expense1] + [Expense2] in an empty cell
in the query builder), and use the query wherever you would otherwise have
used the table.
 
Back
Top