表B的DataColChanging事件代码:
if e.datacol.name = "商品编号" And e.Nevalue > "" then
dim dr as datarow = datatables("表A").Find("商品编号='" & e.Newvalue & "'")
if dr is nothing then
e.Cancel = true
end if
相关知识:
http://www.foxtable.com/webhelp/scr/0624.htm
http://www.foxtable.com/webhelp/scr/0396.htm
搞不定再说话。