以文本方式查看主题 - Foxtable(狐表) (http://www.foxtable.com/bbs/index.asp) -- 专家坐堂 (http://www.foxtable.com/bbs/list.asp?boardid=2) ---- 对一列进行输入限制后,按del删除数据也会出现提示 (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=96481) |
-- 作者:ericotaku -- 发布时间:2017/2/21 22:04:00 -- 对一列进行输入限制后,按del删除数据也会出现提示 Select Case e.DataCol.Name Case "第一列" Dim fdr As DataRow = DataTables("表B").Find("第一列 = \'" & e.NewValue & "\'") If fdr Is Nothing Then e.Cancel = True msgbox("你不能输入这样的值") End If End Select 对一列进行输入限制后,按del删除数据也会出现提示 这样带来的问题就是,如果不小心选中了多条数据,就会出现N条同样的提示。请问有办法改进吗,谢谢
|
-- 作者:有点蓝 -- 发布时间:2017/2/21 22:12:00 -- Select Case e.DataCol.Name Case "第一列" If e.NewValue > "" Then Dim fdr As DataRow = DataTables("表B").Find("第一列 = \'" & e.NewValue & "\'") If fdr Is Nothing Then e.Cancel = True msgbox("你不能输入这样的值") End If End If End Select
|