以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  数据添加填充为空  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=121231)

--  作者:sunion
--  发布时间:2018/7/2 11:23:00
--  数据添加填充为空
各位老师,运行数据填充代码,将“全级学生”表中符合条件的学号,填充到“成绩总表”中。运行结果没有填充,不知道问题出在哪了?

\'---------------------------------跨表引用

Dim Cols30() As String = {"学号"}
Dim Cols40() As String = {"学号"}
For Each dr20 As DataRow In DataTables("成绩总表").DataRows   \'需要填充的表
    For Each dr21 As DataRow In DataTables("全级学生").Select("[班级] = \'" & dr20("班级") & "\' and [姓名] = \'" & dr20("姓名") & "\'")    \'模板母表
        For i As Integer = 0 To Cols30.Length -1 
            dr20(Cols40(i)) = dr21(Cols30(i))
        Next
    Next
Next



--  作者:有点甜
--  发布时间:2018/7/2 11:31:00
--  

参考

 

http://www.foxtable.com/webhelp/scr/1533.htm

 


--  作者:sunion
--  发布时间:2018/7/2 11:37:00
--  
找到问题了,谢谢