For Each dr1 As DataRow In DataTables("产量登记").DataRows
改成
For Each dr1 As row in Tables("产量登记").Rows