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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|