I am developing a database and need to do calcs. on table values. For example, Table 1 value (400) Table 2 vaule (600) need to subtract these and enter them in Table 4 value. I have tried using differant explressions and get back either 0 as totals across the query or nothing in the query results. Any ideas on what I can try.
Tables don't have values.
A Table might have 255 fields (each with a value) and 10,000,000
records. Which of the 2,550,000,000 "values" do you want to add?
Even if you do have a Query which links a particular record of Table1
to a particular record of Table2, it's still unwise to store the total
into Table4.
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.
Perhaps you could post the structure of your tables, how they are
related, and the SQL text of the query that you've tried.