Reference Textbox on Report in Report

BCullenward

Registered User.
Local time
Today, 16:24
Joined
Jul 6, 2005
Messages
28
I am trying to access a textbox I have on a report within the report but it is not working properly. I have a team average for a field in a textbox called txtTeamAvg, however it is only tracking the results for some of the teams. In my report footer I want to take the average of txtTeamAvg where the value is not zero.

I have the code to get the overall average for everyone, ignoring those with a zero for what is being averaged. This is great for those teams where I don't care about their average, but if someone on one of the teams I do care about has a zero in that field the team average will be correct but the overall average will not.

When trying to reference the textbox on the report it says that it is not found. Here is the code I was using for the Control Source:

Code:
=IIf(Sum(Abs([txtAvgNoteCount]<>0))=0,"0",Sum([txtAvgNoteCount])/Sum(Abs([txtAvgNoteCount]<>0)))

where txtAvgNoteCount is the name of the textbox that holds the team average.

Thanks for your assistance.
 

Users who are viewing this thread

Back
Top Bottom