I am a complete beginner with Access and would like to know how to calculate
total product costs in a form. The fields in the Table I want use are Basic
Cost, Vat @14% and Total Cost.
There are many way to calculate total product cost and it depends how
your form is designed. Here are couple of them:
1) Put all fields on form and one unbound field. In unbound field
write formula like "= [Basic Cost] * [Vat]" (without quotes)
2) Change source of query to SQL. You will see the same design of SQL
like when you create query. Add new field on query grid, like "Total
Cost: [Basic Cost] * [Vat]" (without quotes)
3) Use DLookup function (see Help for details)
4) Use VBA code - as you are beginner you will most likely use first
or second approach
Last, do not store any results of calculation in table. If you change
Basic Cost and forgot to run calculation, you will have wrong Total
Cost. Also you can always calculate Total Cost on the fly at any time
when its needed.
Regards,
Branislav Mihaljev, Microsoft Access MVP