Calculations in tables

G

Guest

I am trying to create a table where the VAT Total and Overall Total are
calculated. The VAT calculation uses the Subtotal found in a lookup list
within the table and the Total field uses the calculated VAT Total and the
Subtotal. Is there any way this will work without having to close the table
after the VAT is calculated and then reopen it for it to calculate the total?
 
L

lljo40

Don't do it in a Table!

Use a query, that's part of the power available there. You should NEVER
(well almost never) store a calculated value in a table.
 
J

Joseph Meehan

Chuckie1471 said:
I am trying to create a table where the VAT Total and Overall Total
are calculated.

Tables do not do calculations. Queries and Reports do.
The VAT calculation uses the Subtotal found in a
lookup list within the table

???? lookup list within a table ??
and the Total field uses the calculated
VAT Total and the Subtotal. Is there any way this will work without
having to close the table after the VAT is calculated and then reopen
it for it to calculate the total?

If you are somehow computing the result of a calculation and then
storing the result of that calculation in the table, you should rethink your
table design.

In a database, under normal conditions you never store the results of a
calculation, you re-calculate it when it is needed. That avoids problems
when source values may be edited and generally the database will run faster
and more trouble free that way.

I suspect that you may also need to normalize your data. For example,
if you have one sale with three items being sold; the sale should be in one
table and all the items associated with that one sale should be in another
related table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top