说实话,无法理解你的问题,不过找出对应产品的库存量是很简单的:
For Each dr1 As DataRow In DataTables("产品物料清单").DataRows Dim dr2 As DataRow = DataTables("物料编号").Find("物料编号 = '" & dr("物料编号") & "') If dr2 IsNot Nothing Then dr1("xxxx") = dr2("库存量") End IfEnd If