Avatar

Level 7

It looks like the problem is that you are not referencing the repeated rows. All the rows you add to the table are effectively called Row1 and thats why it wont do it for the other rows added.

If you have a simple change like this:

//Row 1

if (form1.Subform1.TableA.Row1[0].CheckBox1.rawValue == 1)

{

    form1.Subform1.TableA.Row1[0].presence = "hidden";

}
else

if (form1.Subform1.TableA.Row1[0].CheckBox1.rawValue == 0)
   
{
form1.Subform1.TableA.Row1[0].presence = "visible";
}

//Row2

if (form1.Subform1.TableA.Row1[1].CheckBox1.rawValue == 1)

{

    form1.Subform1.TableA.Row1[1].presence = "hidden";

}
else

if (form1.Subform1.TableA.Row1[1].CheckBox1.rawValue == 0)
   
{
form1.Subform1.TableA.Row1[1].presence = "visible";
}

//Row3

if (form1.Subform1.TableA.Row1[2].CheckBox1.rawValue == 1)

{

    form1.Subform1.TableA.Row1[2].presence = "hidden";

}
else

if (form1.Subform1.TableA.Row1[2].CheckBox1.rawValue == 0)
   
{
form1.Subform1.TableA.Row1[2].presence = "visible";
}

This will then reference other repeated rows in the table.

Use the [0] additional code to create a reference to a row. Note that the first row is [0], the second row is [1], third [2] and so on.

Add as many if's as you need or perhaps create a while loop.