以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] 取值 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=159824) |
-- 作者:sanny -- 发布时间:2021/1/10 21:40:00 -- [求助] 取值 老师,如图,我要在生产表中"AssemblingStartingDate列得到DBC_Sa 中assemblingStartingdate 最后一笔记录,中"AAssemblingFinishingDate列得到DBC_Sa 中assemblingFinishingdate 最后一笔记录,以下现只能得到assemblingStartingdate,请帮忙如何修改,谢谢。 For Each rr As Row In Tables("生产").Rows Dim dr As DataRow = DataTables("SDBC_Sa").Find( "BarcodeData = \'" & rr("单号") & "\'","assemblingStartingdate desc") If dr IsNot Nothing Then rr("AssemblingStartingDate") = dr("assemblingStartingdate") rr("AssemblingFinishingDate") = dr("assemblingFinishingdate") End If [此贴子已经被作者于2021/1/10 21:40:24编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/1/10 22:21:00 -- For Each rr As Row In Tables("生产").Rows Dim dr As DataRow = DataTables("SDBC_Sa").Find( "BarcodeData = \'" & rr("单号") & "\'","assemblingStartingdate desc") If dr IsNot Nothing Then rr("AssemblingStartingDate") = dr("assemblingStartingdate") End If dr = DataTables("SDBC_Sa").Find( "BarcodeData = \'" & rr("单号") & "\'","assemblingFinishingdate desc") If dr IsNot Nothing Then rr("AssemblingFinishingDate") = dr("assemblingFinishingdate") End If |