How can I get a calculated control value from a form into the tabl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a control based on two other field names, and I want the calculation
to be saved in another field. Is this possible?
 
It is possible, but not proper.

As posted almost every day in these newsgroups (please make a habit of
searching for an answer before posting) you should not store calculated
values. When you need that value, calculate it in your forms, reports, or
queries.

If you store it, and one of the numbers that make up the calculation change,
then what? Your number is now wrong.

Store the numbers that make up the calculation, not the calculation itself.
 
Conrama said:
I've got a control based on two other field names, and I want the
calculation to be saved in another field. Is this possible?

Possible, but almost always a bad idea. If you can calculate it then it
doesn't need to be stored. All your table needs is the data in the fields
that your expression uses as operands. Using those the calculated value can
always be derived on the fly and that is the fastest and best way to do it.
 
Conrama said:
I've got a control based on two other field names, and I want the calculation
to be saved in another field.


Well, lots of things are possible, but saving a value
calculated from two fields in a third field would be a
violation of data normalization rules. Without more
information, the "correct" thing to do is to perform the
calculation where ever you need to display the result.
 
Back
Top