Form Calculations

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I had the same trouble with a combo box earlier - and it was magically
resolved - not sure how unfortunately.

I have one calculation in a text box in my form. It multiplies qty by unit
cost to give me the ext cost result. The calculation works just fine in the
form - but the data is not being dumped to the only table associated with
this form. In fact this time around I am only working with one table - so
there is no confusion over which table it is or isn't assigned to. All other
fields in form dump to data table without a problem. Only this calculation
field will not.

Why? Can you help? Please?
Thank you!!!
Karin
 
As posted hundreds of times in this group, you don't store calculated values
in the table. That is redundent. If you store the two values that make up
the calculation, then you don't need to store the calculated value too. It
wastes space, slows down the database, and allows data to end up not
matching. What if one value is changed in a query or in the table? What
will trigger the calculated value to update?

Please read the previous posts (that's why they are stored) on why
calculated values should not be stored in a table.
 
Thank you Rick. I appreciate your taking the time to reply. Your answer
does help. I would like to note that I browsed hundreds of these questions
looking for a post that may have answered my question to no avail. Thank you
for your answer however redundant it and my calculated values are.

Have a nice weekend. Karin
 
In some event like AfterUpdate of a control or OnCurrent of the
form you can do this.

Me!Answer = Me!TextBox1 * Me!TextBox2

What Rick B said will eliminate problems with your data in the
future. The biggest problem is if a user changes the data by
opening the table and changing the data. This method will NOT
cause a new answer to be calculated. The answer can always be
calculated in a query or a report.

HTH
Ron
 
Thanks Ronald. There is always a way to force what you want to get done -
LOL....though in theory it does appear I may be better off rethinking my
organizational plan THIS time. I appreciate your response :) Have a great
day.

Karin
 
Back
Top