运行一段代码,将数据填充到临时表的对应单元格,填充数据正确,但是其他数据被清空,如何解决,请各位老师指教,谢谢。
For Each v As String In DataTables("表A").GetValues("批次")
For Each dr As DataRow In DataTables("汇总").DataRows
If dr.IsNull("编号") Then
dr("批次_" & v) = Nothing
Else
Dim pr As DataRow = DataTables("表A").Find("编号 = '" & dr("编号") & "' And 批次 = '"& v &"'")
If pr IsNot Nothing Then
dr("批次_" & v) = pr("缺勤类别")
End If
End If
Next
Next
[此贴子已经被作者于2014-7-28 21:05:53编辑过]