Foxtable(狐表)用户栏目专家坐堂 → beforebuild


  共有3923人关注过本帖平板打印复制链接

主题:beforebuild

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107847 积分:548592 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/12/14 10:42:00 [只看该作者]

调试
msgbox(CurrentTable.name)
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

 回到顶部