A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculating percentage from eneterd values within a table/form



 
 
Thread Tools Display Modes
  #1  
Old February 17th, 2010, 04:03 PM posted to microsoft.public.access.tablesdbdesign
Bex85
external usenet poster
 
Posts: 1
Default Calculating percentage from eneterd values within a table/form

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!
  #2  
Old February 17th, 2010, 05: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!



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.