Mothie,
I'm not sure what your situation is, however, when you want to average a
calculated field, you need to average the calculation rather than the
calculated field itself. For example, if you wanted the average area of
rectangles, you need to use
Avg([Length] * [Width])
And I shouldn't have assumed that none of these might be Null, so you should
check each first, and convert any nulls to zeros:
Avg(Nz([Length]) * Nz([Width]))
This will still, however, give you the average over the total number of
records, regardless if a value is zero.
If you wish to total the average of all *non-zero* values, you could add an
invisible textbox to the Detail section with the Control Source set to:
=IIf(Nz([YourField])=0,0,1)
Let's call it, e.g., "NonZeros". You could return the non-zero average by
the following controls in the footer:
Total: =Sum([YourField])
Count: =Sum([NonZeros])
YourAverage: = [Total]/[Count]
Also, since everyone here always designs well-normalized databases

, I'm
sure you really meant that your *form control* rather than your *field* was
dependent on two other fields.
Hope that helps.
Sprinks
"(E-Mail Removed)" wrote:
> Sprinks,
>
> Thank you very much, that worked, albeit with a bit of tweaking!
>
> For some reason, after doing what you suggested it returned a value of
> 0. I think it was because I had a calculated Control Source for the
> field - i.e. the field that was being 'averaged' was dependent on two
> other fields. These other fields were not null, so resulted in a value
> being returned for the [Compl_Status] field - and yet the average
> didn't return properly. Can you suggest why this was so?
>
> Many thanks
>
> Chris
>
>
> Sprinks wrote:
>
> > Mothie,
> >
> > In the form footer of your subform, place a textbox with the following
> > properties:
> >
> > ControlSource: =Avg([YourField])
> > Visible: No
> >
> > This will calculate the number you're looking for. To display it on the
> > main form, place a textbox that references it:
> >
> > ControlSource: =[YourSubform].Form![YourSummaryField]
> >
> > Sprinks
>
>