averages

J

John

On my report I have a unbound text box doing a calculation of 2 bound text
box which gives me a percentage of each record. Now what I need to do is take
that unbound text box that gives me the percentages and create an average for
all the records based on that unbound text box that creates the percentage.

Thank you
John
 
M

Marshall Barton

John said:
On my report I have a unbound text box doing a calculation of 2 bound text
box which gives me a percentage of each record. Now what I need to do is take
that unbound text box that gives me the percentages and create an average for
all the records based on that unbound text box that creates the percentage.


The aggregate functions (Count, Sum, Avg, etc) only operate
on fields in the record source table/query. They are not
aware of controls in the form/report.

That means if your percentage text box uses an expression
like =field1 / field2, then your report footer text box
would have to use the expression:
=Avg(field1 / field2)
 
J

John

I understand what you are saying and when I do that I only get the last set
of data not for all the records.
 
M

Marshall Barton

What is a "set of data" and what makes a "set" the "last"
one? If the report uses grouping, are you sure you prut the
average text box in the Report Footer?

Note that if either of the fields used in the calculation is
Null, then that record will not be used in the calculation.
 
J

John

this is how I have the report setup and maybe seeing how I am doing this it
may make more sense.

ts1 ts6 ts11 calc1
ts2 ts7 ts12 calc2
ts3 ts8 ts13 calc3
ts4 ts9 ts14 calc4
ts5 ts10 ts15 calc5

the calcs field is my unbound control doing a subtraction of the ts fields.
what I need is to add calc1 threw calc5 as a total everyway I have done this
has failed. There has to be a way to get a total of the unbound control.
Marshall Barton said:
What is a "set of data" and what makes a "set" the "last"
one? If the report uses grouping, are you sure you prut the
average text box in the Report Footer?

Note that if either of the fields used in the calculation is
Null, then that record will not be used in the calculation.
--
Marsh
MVP [MS Access]

I understand what you are saying and when I do that I only get the last set
of data not for all the records.
 
M

Marshall Barton

John said:
this is how I have the report setup and maybe seeing how I am doing this it
may make more sense.

ts1 ts6 ts11 calc1
ts2 ts7 ts12 calc2
ts3 ts8 ts13 calc3
ts4 ts9 ts14 calc4
ts5 ts10 ts15 calc5

the calcs field is my unbound control doing a subtraction of the ts fields.
what I need is to add calc1 threw calc5 as a total everyway I have done this
has failed. There has to be a way to get a total of the unbound control.


Now I am even more confused.

You said:
"calculation of 2 bound text box"
"gives me a percentage of each record"
"each record has five values"
"unbound control doing a subtraction of the ts fields"
"I need is to add calc1 threw calc5 as a total"

At this point, I can't even figure out what values are in
what record, what values are used in the calculation, what
you mean by "total", or what you want to average.

It might be useful if you could post a small set of sample
records and how you want the report to display them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top