我的表有第一列,第二列....第八列,合计列共9列。当选定复选框1的时候,显示第一列、第二列;选定复选框2的时候,显示第三列、第四列;选定复选框3的时候,显示第五列、第六列,选定复选框4的时候,显示第七列、第八列。Dim t As Table = CurrentTable
For Each c As Col In t.Cols
c.visible = False
Next
If forms("指定显示列").Controls("CheckBox1").checked=True Then
t.Cols("第一列").visible = True
t.Cols("第二列").visible = True
End If
If forms("指定显示列").Controls("CheckBox2").checked=True Then
t.Cols("第三列").visible = True
t.Cols("第四列").visible = True
End If
If forms("指定显示列").Controls("CheckBox3").checked=True Then
t.Cols("第五列").visible = True
t.Cols("第六列").visible = True
End If
If forms("指定显示列").Controls("CheckBox4").checked=True Then
t.Cols("第七列").visible = True
t.Cols("第八列").visible = True
End If
通过这样的代码就达到了要求。但是我想实现一个功能,选中的复选框数量超过1个的时候,显示合计列,请问如果编写代码实现?