以文本方式查看主题

-  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=112801)

--  作者:有点甜
--  发布时间:2018/1/3 11:20:00
--  

参考代码

 

Dim dt1 As DataTable = DataTables("股金信息")
Dim dt2 As DataTable = DataTables("股金数据")
Dim zhs As String = dt2.GetComboListString("f_zh", "f_lb = \'销户\' and f_nh < \'" & Date.today.year & "\'")
msgbox(zhs)
zhs = zhs.replace("|", "\',\'")
dt1.deletefor("f_zh in (\'" & zhs & "\')")

[此贴子已经被作者于2018/1/3 11:21:05编辑过]