I assumed if I referenced "FamilyName" object within the foreach loop then it would be referencing the current object that it is cycling through ie. if 3 objects in a family:
foreach (FamilyName object){
sometext.setText("We are currently looking at FamilyName object ID Number "& FamilyName.ID )
}
So the first iteration would export the ID of the first FamilyName object, then the second cycle would export the ID of the second FamilyName object, then the third cycle would export the ID of the third FamilyName object
However this isn't the case. Every cycle of "FamilyName" would point to just the first object.
I eventually gave up with families so now I have 10 separate objects and therefore 10 lots of code.