Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing over calculated fields

Status
Not open for further replies.

MaddiMond

Technical User
Mar 28, 2005
76
US
I have a form field in a form whose control source is a calculation. While entering data, I realized that sometimes the amount that has to be entered diverges from the calculated amount. I tried to write over it, but it does not work. I tried to search for writing over calculated fields in the forum, but did not find anything. I know the event procedure Not in List. Is there anything similar for a calculated field?

Maddi Mond
 
If you don't have a field to store the results in, what would be the point?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
You can't assign a value to a control having a formula as ControlSource.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Greg,

I am trying to change this now and actually store the calculated field in the table, but I face many problems. This is my first real database project and I am learning by doing right now...I have made it a point to not store calculations in a table, as I have heard over and over again, now this decision comes back to haunt me. I think what they are really looking for in this case is a trail where they can follow the calculated values that reflect historical accuracy. I have a main table where all the data is stored that is entered. I also, when I built the table, included fields in this main table that are calculated thinking I would store the values in these fields. But I did not know how to store values that are calculated in a query in a table where from most of the data already comes (circular reference). I guess I have to create a new table like a transaction table, where I store the calculated fields and then base the calculated values in the report not on the query but on this table. Do you think that makes sense?

Greetings,

Maddi
 
If the value is initially calculated, but can be 'overwritten' you should have a field in the table for it. You can calculate the original value and store it there, then allow the users to override it. (Or if it is a new record, set the default value to a calculation, still allowing the override). OR any number of other ways.

If a field is ALWAYS calculated, don't store it.

If a field is SOMETIMES calculated (or the calculation can change over time), you need to store it.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top