Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Average Calculation

Status
Not open for further replies.

bigandfat

Technical User
Feb 7, 2002
42
CA
I have a table Keyed on Date with 50 data fields. I need to average the 50 data fields. When I try to create a calculated field on a form it will only allow me to add 15 fields together, then I get a syntax error. I guess the calculated field can only contain 15 variables?

How would an expert attack this problem.

Thanks in advance
 

Did you use: Avg([TABLE.FieldA]) as your calculation int eh calculated field?

You can also do a query with the CALC AVERAGE operator in the field that you want the average on.



Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Oops, I misunderstood the question. For a form I would attach ObjectPal code to the field and update it with a button or the event of your choice.

i.e. mycalcfield.value = (field1.value+field2.value+field3.value+field4.value/4)

Of course you would have 50 fields and divide by 50.

Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top