A
Alex H
Hi, I have a sub form which lists the records related to the main form.
Two of the fields of the sub form are [Phase] and [Marks]
In the footer of the sub form, I want to calculate the average [Marks],
where the [Phase] field = 1.
The code I have used is: =Avg(IIf([Phase]=1,[Marks],0)).
What is happening is that it is calculating the Average of all the records
displayed in the sub form, including those where [Phase] is not equal to 1.
Can anyone help please?
Tks
A
Two of the fields of the sub form are [Phase] and [Marks]
In the footer of the sub form, I want to calculate the average [Marks],
where the [Phase] field = 1.
The code I have used is: =Avg(IIf([Phase]=1,[Marks],0)).
What is happening is that it is calculating the Average of all the records
displayed in the sub form, including those where [Phase] is not equal to 1.
Can anyone help please?
Tks
A