在命令窗口执行:
For Each dr1 As DataRow In DataTables("库存").DataRows Dim nms As String = DataTables("明细").GetComboListString("批次","产品名称 = '" & dr1("产品名称") & "'") dr1("库存状态") = nms.Replace("|"," ")Next