以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 提示问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=120079) |
-- 作者:aza520 -- 发布时间:2018/6/6 16:30:00 -- 提示问题 我在表的DataColChanged事件,设如下代码。如何补充代码,实现;当“身份证号码”列为空值时(即不输入任何数值时),不出现提示? If e.DataTable.find("len(身份证号码) <18") IsNot Nothing Then e.Cancel = True \'那么取消输入并提示用户 Messagebox.Show("身份证号码不完整!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If If e.DataTable.find("len(身份证号码) >18") IsNot Nothing Then e.Cancel = True \'那么取消输入并提示用户 Messagebox.Show("身份证号码不完整!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If
|
-- 作者:有点甜 -- 发布时间:2018/6/6 16:33:00 -- If e.datacol.name = "身份证号码" Then If e.newvalue > "" AndAlso e.newvalue.length <> 18 then msgbox("身份证不正确") End If End If |