View Single Post
  #2  
Old May 8th, 2010, 02:09 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Expression in forms

On Fri, 7 May 2010 17:33:01 -0700, Jamo
wrote:

I am new to Access and I have a Table with a field called total.


Then you have an incorrectly structured table. The Total field should simply
*not exist*.

I have
created a form to enter or modify data .I put an expression in the form in
the Total field .The expression adds the results of several fields in the
form and I want to add the total to the Table total field.The expression adds
the field in the form but I can't get the field in the Table to update.I am
not sure how do do this.not even sure what expression to write and where to
put it .I gues what I am looking for is a clear step by step proceedure on
how to do that. I realy need help


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.

--

John W. Vinson [MVP]