View Single Post
  #2  
Old February 17th, 2010, 04:03 PM posted to microsoft.public.access.tablesdbdesign
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Calculating percentage from eneterd values within a table/form

Bex85,
A table Default Value can be a value, but not a calculation.
You'll need to do that in a query, by adding a calculated field.
or
On a form, by forcing the result of an unbound Pct calc into a
numeric field of your table. (single probably)

As a general rule, editing should not be done in a table.
And,"storing" a calculation in a table, that can be recalculated
"on the fly," from data already stored to that table, in any subsequent
form, query, or report... is inadvisiable.
It's not an immutable law... just good practice.

I've stored a calculated value... because it involved an extremely
complicated query with multiple tables, and multiple calculations.
Something I just didn't/couldn't bring together for the many subsequent
forms, queries, and reports that utilized that calculation.
Your calc just involves table values you already have, so I'd use the
recommended (normal?) way of handling it.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"Bex85" wrote in message
...
Within my database I have a table where I will enter the fresh weight of
an
object in one field and the thawed weight of the object in another field.
I then wish access to calculate the percentage weight loss by :
(Fresh Weight-Thawed Weight)/Fresh Weight*100

I have attempted to do this as a default value of a field during the
design
of a table, but as data has not been entered into the weight fields access
gets confused and won't allow this.

Is there a way to do this without creating a query or doing it within a
form?
If I have to create a query or do it within the form, is there a way to
link
back the calculated value so that it is displayed in the original table?

I am a novice at Access and have only been on an introductory course to
this
programand so have limited knowledge. All mention of macros and code
swoops
over my head!