Calculate average fields on a form

swift

Registered User.
Local time
Today, 07:07
Joined
Mar 12, 2006
Messages
67
Hi,

I have a simple DB, and a table contains three numeric fields which are measurements taken on the same item to assess consistency. Obviously I can show these values on the form and report, I now need to calculate an average of these three fields and show this value on the form and report.
Sounds simple but its driving me up the wall!!:mad:
Can anybody help me with this please? I thought it could be done in a similar way to calculating averages in Excel (functions etc.. in a text box) but I cannot seem to get it right!!
Apologies if this should be in Tables/Reports etc - I couldn't decide where it should go!!
Thanks in advance,

Swifty:)
 
You can have a text box on your report that has the control source of something like this:

=([YourFirstFieldHere]+[Your2ndFieldHere] + [YourThirdFieldHere])/3

Now, your textboxes should not have the same name as the field names, so if they do go change them to something like txtYourFirstFieldHere.

Don't put the formula in until you change the text box names, otherwise Access will change your formula to refer to the text box names and not the fields, but you want to refer to the fields.
 
Bob, you are an absolute legend;)
I've been messing about with that for what seems like an age....turns out I wasn't far away from what you mentioned above!!
Thanks very much for your help (quick as well :) )

swifty
 

Users who are viewing this thread

Back
Top Bottom