Full Version: calculations
UtterAccess Forums > Microsoft® Access > Access Forms
enrico
good afternoon!

I would like to ask how can a calculation performed in the form be stored in the table in the microsoft access

thank you!
danishani
Welcome to Utter Access Forums!! frown.gif
Why u need to store calculations in a table, when they can be done on the fly?
Storing calculations is against normalization rules.
What kind of calculations u want to make?
Daniel
enrico
good morning!
Oapologize for i haven't stated my problem properly. what i meant on my question last week is that how can i store in the table the result of a particular calculation performed in the form
R. Hicks
If the values that are used in the calculation are being stored in your table ... you should not store the calculated result ...
DH
enrico
good morning!
Oapologize for i haven't stated my problem properly. what i meant on my question last week is that how can i store in the table the result of a particular calculation performed in the form. i'm making a simple program which you'll input the particular rate/day and the no. of days of a worker, then his/her "total" will be automatically computed in the form. i already made it but the result in the field "total" in the table is blank. i don't know how to store it from the form to the table.
hoping you could help me with this simple problem. thank you!frown.gif
R. Hicks
This value "should not be stored" in a table ...
You calculate this value on the fly when the value is needed ... but not store it.
DH
enrico
goodmorning!
i'm making a simple program and i need to save the values to be inputted for the calculation 'cause it'll our basis for the record. is there any way that the field that you'll input and the result is stored? i've given a particular field on the table of the result anyway.
thanks!
R. Hicks
From what you have posted ... you should not attempt to save this calculated value in your table ...
If any of the values used in the calculatation should be altered for any reason ...
Your stored calculated result will be incorrect ...
This would mean your data integrity would be in jeopardy ...
RDH
enrico
goodmorning!
thanks for answering to my problem!
I just want to ask if it's ok, how can you retrieve the datas in the form including the calculated ones if you want to show it, i mean all your datas.
Edited by: enrico on Wed Oct 13 20:59:00 EDT 2004.
dude
hi. i'm very new to access db programming. i am having a similar issue to enrico's. i need to create a report using several "regular" fields and one computed field from my form but as the issue above states, i too can't figure out how to get the value of the computed field from the form back to the table and that's from where i need to grab the data for the report. i probably need to learn my reporting software better so that i could do the calculation in there, but is there any way to force the computed value into the table in the meantime? thanks- e
eb1mom
Hi, You could create a query using table as source. Put the calculated field in the query and use the query as the source for your report. HTH
dude
thanks for your quick response! this is probably a dumb question but i can't get the computed field's value in the query either because its value never makes it back to the table. thanks for your help- e
Garfieldm842
Don't calculate the value on the form. Calculate the value in a query and then display it on the form and/or the report.
When you won't have to worry about storing it in a table as it will be in your query, which you can use as the source of the data that shows up in the form and report.
Good luck!
eb1mom
Try this link it has many code examples. Look at QrySmp00. web page
dude
thanks garfieldm842 and eb1mom for your your awesome and quick help and ideas. i haven't had a chance to try them since i figured out how to get our reporting software to do the calculation for me and now i've been switched to another project yet again. i'm looking forward to getting back to this asap- it's something i feel like i should know. thanks again- erik
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.