Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
关联表: "货品资料"为父表,"多单位及价格定义"为子表.
问题: "多单位及价格定义"表中的"基本单位"列非空时禁止直接删除,但如果在父表删除行时,同步删除子表关联行(包括"基本单位"列非空的行)
请问如何设置?
下载信息 [文件大小: 下载次数: ] | |
![]() |
多单位及价格定义表,BeforeDeleteDataRow事件代码:
If CurrentTable.Name = "多单位及价格定义" Then
If e.DataRow.IsNull("基本单位") = False Then
e.Cancel = True
MessageBox.Show("禁止删除")
End If
End If
我原来是这样设置:
If e.DataRow.IsNull("基本单位") = False Then
e.Cancel = True
MessageBox.Show("禁止删除")
End If
所以出错,谢谢!