For Each dr1 As DataRow In DataTables("计算用量").DataRows Dim ks As String = dr1("款式") Dim xh As String = dr1("型号") Dim mx As String = "" For Each dr2 As DataRow In DataTables("用料清单").Select("产品_款式 = '" & ks & "' And 产品_型号 = '" & xh & "'") mx = mx & dr2("弹簧用量_物料名称") & dr2("弹簧用量_单位用量") & dr1("订单数量") & " " Next dr1("用量明细") = mx.TRim() Next