Foxtable(狐表)用户栏目专家坐堂 → 关联表子表条件禁止重复


  共有2489人关注过本帖树形打印复制链接

主题:关联表子表条件禁止重复

帅哥哟,离线,有人找我吗?
Hyphen
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐神 帖子:5015 积分:25363 威望:0 精华:0 注册:2015/8/18 9:21:00
  发帖心情 Post By:2016/7/8 8:48:00 [显示全部帖子]

BeforeAddDateRow事件

Dim parent As DataRow = e.DataRow.GetParentRow("父表")
Dim count As Integer = DataTables("父表").compute("count(_Identify)", "第三列 = '" & parent("第三列") & "' and 第二列 = '" & parent("第二列") & "'and 第四列 = '" & parent("第四列") & "'"))
If count > 1 Then
    msgbox("重复了")
    e.Cancel = True
End If

 回到顶部