Formula, Table, Query & Form Help?!

D

DH010010

I have a form that once filled logs the information in to a table. Now on
this form there is quite a lot off adding up and taking away. I have a total
amount due box which I would like Access to complet for me and then enter the
amount due in to the table. I have everything licked except this I have sat
for 2 days straight trying to do it and for the life of me I cant't. Can Any
one help?

Many thanks.
 
J

Jeff Boyce

In many instances, it is unnecessary (and undesireable) to store such a
calculated value.

Is there a reason you can't just use the form (or a query) to do/display the
calculated total?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

DH010010

yes. the answer is needed in the table as it will display in seprate
reportsif the value is <>0
 
K

Klatuu

Nope you still don't really need it. Do the same calculation in the report
that you do on the form. That is the correct method. Storing calculated
values that can be replicated with store data should not be stored in a
table. It take disc space, it is slower to execute, and has a high
likelyhood of becoming incorrect.
 
J

Jeff Boyce

If you need the total for display purposes (e.g., in a form or in a report),
use a QUERY as the source and do the calculation in the query.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John W. Vinson

yes. the answer is needed in the table as it will display in seprate
reportsif the value is <>0

That's true IF you assume that a Report can only use stored table values. That
assumption is incorrect.

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or just as you're now doing it -
in the control source of a Form or a Report textbox.
 
Top