TextBox 的 leave事件代码:
Dim drs As List(Of DataRow)drs = DataTables("outtable").Select("[单号] = '" & e.Form.Controls("TextBox2").text & "'") If drs.count > 1 messagebox.show("此单号已存在,请重新选择!","提示") e.Form.Controls("TextBox2").value = Nothing
e.Form.Controls("TextBox2").Select()End If