If CurrentTable.name = "SBG对账单" Then
Dim tbl As Table = Tables("SBG对账单")
msgbox(e.Book.TempLate)
If e.Book.TempLate = "开具fa piao项目" Then 'TempLate是指模板文件的名称
Dim cnt As Integer = tbl.DataTable.GetValues("页码", Tables("SBG对账单").filter).count '统计某列筛选后含有多少个不同的页码, 加上 Tables("接头BOM").filter 就是进行筛选的意思,不加,就是所有数据
msgbox("cnt =" & cnt )
If cnt > 1 Then
messagebox.show("本页面存在 " & cnt & " 个不同的页码, 请重新筛选后再使用此按钮!")
Else
msgbox(1)
'不起作用?
Dim a As Row = Tables("SBG对账单").Current
msgbox(a.isnull("同年月序号"))
If a.isnull("同年月序号") Then
MessageBox.Show("存在 同年月序号 为空值的行!")
Tables("SBG对账单").Filter = "[同年月序号] is null"
End If
End If
End If
End If