Calculating Data in a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 fields - a subtotal and a total. To get the total, I want Access to
times the subtotal by 1.1 (to add on 10% tax). I have created a form for
users to input the details. I tried putting the following expression in the
Total box:
=[SubTotal]*1.1
When I input a figure into the Subtotal field, the correct Total amount is
calculated and shown on the form. However, it is not saved in the Total field
of the underlying table. Is there a way to do this?
 
Yes, there is a way to do this. However, you should not be storing
calculated values in the table. This violates the rules of normalization.
If you want to view the results of calculations then create a query to
perform the calculations on the fly based on values that were stored.
 
Tray said:
I have 2 fields - a subtotal and a total. To get the total, I want
Access to times the subtotal by 1.1 (to add on 10% tax). I have
created a form for users to input the details. I tried putting the
following expression in the Total box:
=[SubTotal]*1.1
When I input a figure into the Subtotal field, the correct Total
amount is calculated and shown on the form. However, it is not saved
in the Total field of the underlying table. Is there a way to do this?

Dump your Total field and create a query with a computed field using
your formula and the same name as the table field you had

"MYFIELDNAME: [MYSUBTOTAL] * 1.1"

Then use the query as if it were the table.
 
Back
Top