以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  提取相同多行的备注到指定列  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=185327)

--  作者:zhuxinhui
--  发布时间:2023/2/16 16:46:00
--  提取相同多行的备注到指定列

Dim s As Table = Tables("应付")
Dim u As Table = Tables("现金银行")
For i As Integer = 0 To s.Rows.count - 1
    Dim dr As String = s.Rows(i)("立帐编码")
    Dim nms As String = dr("核销摘要")
    For h As Integer = 0 To u.Rows.count - 1
        Dim t2 As Row = u.Rows(h)
        If u.Rows(h)("立帐编码") = dr("立帐编码")Then
            nms = nms & t2("摘要")
        End If
    Next
    dr("核销摘要") = nms & dr("备注")
Next

想把有多行相同立帐编码的摘要,汇集在指定的核销摘要列


图片点击可在新窗口打开查看此主题相关图片如下:qq截图20230216164253.png
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2023/2/16 16:54:00
--  
Dim dr As String = s.Rows(i)("立帐编码")
改为
Dim dr As row = s.Rows(i)