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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculated Field



 
 
Thread Tools Display Modes
  #1  
Old October 27th, 2009, 08:16 PM posted to microsoft.public.access.forms
Jen
external usenet poster
 
Posts: 544
Default Calculated Field

Hi Guys,
I've got a Form containing four bound fields which accept numeric data.
The numbers entered into these fields will only be 0,1,2 or 3. I'd like to be
able to add a fifth, unbound field which calculates the Sum of the four bound
fields and returns the answer as a percentage of 12 (the highest possible
total of the bound fields).

Any help is greatly appreciated,
Jen
  #2  
Old October 27th, 2009, 08:24 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Calculated Field

Jen

Are you saying that you want the value (i.e. ControlSource property) of the
fifth control (in forms they're called 'controls', not fields) to be:

=([Field1] + [Field2] + [Field3] + [Field4])/12

You can use the fifth control's Format property to format as a percentage
value.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Jen" wrote in message
...
Hi Guys,
I've got a Form containing four bound fields which accept numeric data.
The numbers entered into these fields will only be 0,1,2 or 3. I'd like to
be
able to add a fifth, unbound field which calculates the Sum of the four
bound
fields and returns the answer as a percentage of 12 (the highest possible
total of the bound fields).

Any help is greatly appreciated,
Jen



  #3  
Old October 27th, 2009, 09:04 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Calculated Field

Try this --
Percentage: ((Nz([Field1],0)
+Nz([Field2],0)+Nz([Field3],0)+Nz([Field4],0))/12)*100
Field1 is the name of field in the table, not the form.

--
Build a little, test a little.


"Jen" wrote:

Hi Guys,
I've got a Form containing four bound fields which accept numeric data.
The numbers entered into these fields will only be 0,1,2 or 3. I'd like to be
able to add a fifth, unbound field which calculates the Sum of the four bound
fields and returns the answer as a percentage of 12 (the highest possible
total of the bound fields).

Any help is greatly appreciated,
Jen

  #4  
Old October 27th, 2009, 09:22 PM posted to microsoft.public.access.forms
Jen
external usenet poster
 
Posts: 544
Default Calculated Field

Karl/Jeff,
Thank you both very much for taking the time to help me. I got it working
using a little bit of both your answers. I must be getting stressed if i
think that controls are fields now

Thanks again for the help guys,
Jen xoxo

 




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 12:30 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.