以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]请问如何在B表不加载的时候获取到B表中的数据,生成到A表中  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=153288)

--  作者:爱秦宣言
--  发布时间:2020/8/6 9:38:00
--  [求助]请问如何在B表不加载的时候获取到B表中的数据,生成到A表中
请问如何在明细表 不加载的时候获取到 明细表 中的数据,生成到其 他表中?目前只能加载后才能获取到

If e.DataCol.Name = "卷号" Then
    Dim nms() As String = {"品名","厚度","宽度","规格","牌号","产地"}
    If e.NewValue Is Nothing Then
        For Each nm As String In nms
            e.DataRow(nm) = Nothing
        Next
    Else
        Dim dr As DataRow
        dr = DataTables("明细表").Find("[卷号] = \'" & e.NewValue & "\'")
        If dr IsNot Nothing
            For Each nm As String In nms
                e.DataRow(nm) = dr(nm)
            Next
        End If
    End If
End If
[此贴子已经被作者于2020/8/6 9:39:29编辑过]

--  作者:有点蓝
--  发布时间:2020/8/6 9:43:00
--  
dr = DataTables("明细表").sqlFind("[卷号] = \'" & e.NewValue & "\'")