以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  禁止输入重复  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=52794)

--  作者:zhangxl1964
--  发布时间:2014/6/23 13:40:00
--  禁止输入重复
老师:你好!

      帮助中禁止输入重复值:
   If e.DataCol.Name = "订单号" Then

    Dim dr As DataRow
    dr = e.
DataTable.Find("订单号 = \'" & e.NewValue & "\'")
   
If dr IsNot Nothing Then
        MessageBox.Show(
"此订单号已经存在!")
        e.Cancel =
True
    End
If
  End
If

   只是对已加载的有效,怎样从后台找到重复值并禁止输入?


--  作者:y2287958
--  发布时间:2014/6/23 13:44:00
--  
http://www.foxtable.com/help/topics/2911.htm