For Each dr1 As DataRow In DataTables("补偿标准表").dataRows
Dim nms() As String = {"土地类","房屋类"}
dr1("补偿标准使用情况") = False
For Each nm As String In nms
For Each dr2 As DataRow In DataTables(nm).DataRows
If dr1("补偿标准代码") = dr2("补偿标准代码")
dr1("补偿标准使用情况") = True
Exit For
End If
Next
If dr1("补偿标准使用情况") = True Then
Exit For
End If
Next
Next
For Each dr1 As DataRow In DataTables("项目").dataRows
Dim nms() As String = {"土地类","房屋类"}
dr1("项目代码使用情况") = False
For Each nm As String In nms
For Each dr2 As DataRow In DataTables(nm).DataRows
If dr1("项目代码") = dr2("项目代码")
dr1("项目代码使用情况") = True
Exit For
End If
Next
If dr1("项目代码使用情况") = True Then
Exit For
End If
Next
Next
[此贴子已经被作者于2011-7-6 16:10:30编辑过]