Saving the value of a Calculated Field to a record?

  • Thread starter Thread starter PistolPete
  • Start date Start date
P

PistolPete

Guest
Afternoon all,

I've got a calculated field on my form that is getting some of the values needed for the calc from a subform. I've now been told that they want the value in the calc field to be saved with each record for when they do reports. Does anyone know a easy way to do this?

Pete
 
It isn't normal practice to "store" calculated values, you can put the calculated control directly on the report or in a query and use the query as the record source for the form and report.
HTH
 
Hi PistolPete

I agree with Rich above (not surprising, given the shared name!) but I would add one thing that could help you explain things to others.

If you have a total (a calculated field) that is made up of the combination of three other fields then you have automatically stored the "calculated field/information" anyway (the total is made up of the three parts ... so, so long as your calculation/expression is fixed, you automatically have the total stored as well).

With a Relational Database the idea is to maintain data integrity and not to store the same information in more than one place. If you actually store the calculated field in another field you are already creating duplication of data and if one of the three parts were altered (for example the customer decided to increase the number of items purchased) then you would run the risk of having a mismatch in totals ... the calculated total would give you one figure (based on updated quantity) the stored total would give you the original total. Ooops!

HTH

Rich Gorvin
 
Thanks guys that just the ammo I needed to let them know that it was a bad idea.

I know they wanted to keep the calc totals as the equations are very complex and to save having to do them again.

Thanks again

Pete
 

Users who are viewing this thread

Back
Top Bottom