以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  选择记录计数  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=132579)

--  作者:nxqtxwz
--  发布时间:2019/3/25 12:33:00
--  选择记录计数
请问老师,在自建窗口的表中有一列是逻辑列,有没有办法限制每次逻辑列最多选择5条记录呢?
--  作者:有点甜
--  发布时间:2019/3/25 14:16:00
--  

datacolchanging事件

 

If e.DataCol.name = "第四列" AndAlso e.newvalue = True Then
    Dim count = e.DataTable.compute("count(第四列)", "第四列 = true")
    If count > 4 Then
        e.cancel = True
        msgbox("不能超过5")
    End If
End If