以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  文本框中如何判定输入的值在表列中是唯一  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=173289)

--  作者:chunglijane
--  发布时间:2021/11/23 1:11:00
--  文本框中如何判定输入的值在表列中是唯一
问:文本框中如何判定输入的值在表列中是唯一?在那个事件写的程式代码?
--  作者:有点蓝
--  发布时间:2021/11/23 8:33:00
--  
valuechanged事件

使用find查询表格是否已有文本框录入的值:http://www.foxtable.com/webhelp/topics/0396.htm

Dim dr As DataRow
dr = 
DataTables("产品").Find("产品编号 = \'" & e.sender.text & "\'")
if dr isnot nothing then
msgbox("已经存在值" & e.sender.text)
end if
[此贴子已经被作者于2021/11/23 8:34:02编辑过]