mapat
03-12-2007, 04:25 AM
hello,
I have a table with "fieldA", "filedB", and "filedC". I want "fieldC" to be the result of multiplying "fieldA" and "filedB". How can I do this?? I don't want to have to type in the result in "fieldC", I want this to be done automatically when I fill up "fieldA" and "filedB."
thank you very much
llkhoutx
03-12-2007, 04:53 AM
It is bad practice to save calculated values is a table. They can/are easily calulated when really needed.
GaryPanic
03-12-2007, 05:04 AM
on a form
I would have afterupdae on fieldb
fieldc=fielda*fieldb
But as has been stated .....
storing calculated values can be a bad practice
g
llkhoutx
03-12-2007, 05:17 AM
No, storing calculated values can is a bad practice.
GaryPanic
03-12-2007, 05:26 AM
likhoutx
agree- but there are always exceptions to any rule -
circumstances bizzard audit requirements may make this a requirement
I have come across this due to requirments
I have a value and a rate giving a price - it was a requirment that this be calcultated and stored as 3 values and not recalculated all had to be fixedd and entered into a history table which again was fixed
this was a requirement by "compliance department " and i am sure you have come across this yourself they make a decision and they will not be moved from it we suffer from FSA regs - most make no sense and have little use - but we still have to do it there way unitl they are proven wrong
but on the whole I agree with you on this
g
llkhoutx
03-12-2007, 05:29 AM
If the data is inpuit via a form, it is easily calculated as GaryPanic noted.
You can also similarily calculate the field with a Update query.