Full Version: Store Control Conversiion Reselt In Table Field
UtterAccess Forums > Microsoft® Access > Access Forms
charlessielicki
hello
want to store a calculated number in a table field using a form
Ounderstand that usually the most raw data is stored in a table
the data i am entering is in degrees mins sec [this is how the data comes to me]
the data i want to store in a table is in rads [because this is how the other access trig cals like it]
in this case how to i get from the unbound expression control [where the conversion takes place] to the table field?
many thanks
charlie s.
MiltonPurdy
It is normally not a good idea to store results of calculations unles there is some business reason, like for historical or audit purposes.
It is better to do the calculations in a query then feed those to the form.
Then anytime you run the form the calculations are done on fresh data and you don't take up a lot of space in your table.
You could always, if necessary, run an update query from with a command button on the form to update the table.
GroverParkGeorge
Welcome to UtterAccess.
Is Milton has already pointed out, storing calculated values is not a good strategy in most situations. The ONLY times it is viable are 1) the underlying data is subject to change so a re-calculation would not be feasible, e.g. a "list price" component of a sales price, or 2) you have such massive amounts of data that an "on-the-fly" recalculation would be prohibitively expensive in terms of processing time.
Your conversion to rads doesn't qualify on point 1. Minutes, seconds and rads aren't going to change. Your original measured value is not going to change.
On point 2, you COULD conceivably have so many thousands of records to display that a stored calculation might be feasible, if you need it for reporting.
The fact that you are feeding the results to another calculation does suggest that performance MIGHT benefit from working with a stored, calculated value, but, again, unless you have really tons of data, probably not.
That said, the answer is an update query that updates the rad field with the results of the calculation.
charlessielicki
10/22/11
eorge, Milton
Really appreciate the quick help. I'll take the route of the update query.
Best
Charlie S.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.