Add the data to the table automatically

W

Wayne

Hi all,

After input the data in the field of the table, how can I calculate the input data and send it back to other field of the same table.
For example, there are two fields in the table. Field 1 and Field 2 and Field 2 should be 2 times Field 1.
After input '10' in Field 1, 20 will be input to the Field 2 automatically.
After input '5' in Field 1, 10 will be input to the Field 2 automatically.
After input '100' in Field 1, 200 will be input to the Field 2 automatically.

In this table, there is no any form. How can I achieve it? Shall I use Marco?
Thank you very much!

Wayne
 
J

John Vinson

After input the data in the field of the table, how can I calculate the input data and send it back to other field of the same table.
For example, there are two fields in the table. Field 1 and Field 2 and Field 2 should be 2 times Field 1.

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]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top