Hi,
I would put the code in the calculate event of the text field, something like;
var result = 0;
var instanceCount = _Subform2.count;
var instances = Form1.resolveNodes("Subform2[*]");
for (var i = 0; i < instanceCount; i++)
{
if (instances.item(i).Table1.Row2.Score.rawValue == "N/A") {
result++;
}
}
this.rawValue = result;
The reference to "_Subform2.count" will ensure the code is executed every time an instance is added or removed.
Regards
Bruce