PC Review


Reply
Thread Tools Rate Thread

Calculating percentage from eneterd values within a table/form

 
 
Bex85
Guest
Posts: n/a
 
      17th Feb 2010
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!
 
Reply With Quote
 
 
 
 
Al Campagna
Guest
Posts: n/a
 
      17th Feb 2010
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" <(E-Mail Removed)> wrote in message
news:A5F3C894-0EAA-475A-94C3-(E-Mail Removed)...
> 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!



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating percentage of non-numeric values. pharmer8 Microsoft Excel Misc 4 18th Sep 2009 02:56 AM
Find top 5 highest values/percentage within a table Tobias Microsoft Excel Worksheet Functions 2 15th Sep 2008 12:39 PM
Calculating a percentage from values in two different fields ChuckW Microsoft Access Reports 0 23rd Jan 2008 01:49 AM
Calculating difference of two values as a percentage =?Utf-8?B?dm9sZ2Fs?= Microsoft Access 2 18th Oct 2007 05:06 PM
Calculating Percentage in a form =?Utf-8?B?RGVjZW1iZXJzb25hdGE=?= Microsoft Access Forms 1 7th Feb 2006 04:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:53 AM.