Saving a calculation field

vand_uk

Registered User.
Local time
Today, 18:08
Joined
Aug 26, 2004
Messages
32
Having some problems with a calculated field on a form. The field came from my table but I typed in the calculation (=[cost_price]+[sale_price]) and it works fine but it wont save to my table so when I run a repot off it doesnt have any of the calculated values because they arent saved in my table??? Can anyone help?

Thanks
Tom
 
Don't save it. Calculate it when you need it - i.e. in the query behind the report.

Col
 
Colin's answer, while correct, is very short.

Queries do everything (well... almost everything) that tables do, PLUS because of field selectivity, formula inclusion, JOIN capability, UNION capability, and Summation ability, they do more.

You should learn more about queries as a way to get exactly what you want where you want it when you want it. BUT also to recompute anything for which a formula exists. (Your price formula, e.g.) You NEVER store that which you can calculate on the fly. Your computer is fast enough to transparently do this computation every time and thereby SAVE SPACE.

OK, you say, my piddly little MDB file is less than 100 Kb on its worst day. My hard drive has 200 Gb total space and is still about 85% free. So what space do I need to save? Why, internal Access record space of course. By not storing data you can recompute on-the-fly, you make your records shorter. BUT shorter records means faster operation 'cause the speed of Access depends on the number of records that fit in a fixed-size buffer. Shorter records in fixed holder = more records in that holder. Which means faster, more efficient operations.

Colin told you the "what" of the issue. I just told you the "why."
 

Users who are viewing this thread

Back
Top Bottom