以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 如何用一个按键来实现先移后删? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=186716) |
-- 作者:lin98 -- 发布时间:2023/5/23 13:36:00 -- 如何用一个按键来实现先移后删? 表A的"[状态] =作废的数据移到表B后,在表A中删除,如何用一个按键来实现先移后删? 下面代码只复制数据,后面如何实现? Dim Cols1() As String = {"列一","列二","列三"} Dim Cols2() As String = {"列一","列二","列三"} For Each dr1 As DataRow In DataTables("表A").Select("[状态] = ‘作废’") Dim dr2 As DataRow = DataTables("表B").AddNew() For i As Integer = 0 To Cols1.Length -1 dr2(Cols2(i)) = dr1(Cols1(i)) Next Next |
-- 作者:有点蓝 -- 发布时间:2023/5/23 13:42:00 -- 最后加一句:http://www.foxtable.com/webhelp/topics/0394.htm DataTables("表A").deletefor("[状态] = ‘作废’")
|