Dim r1 As DataRow = DataTables("安全费用提取").find("企业名称 = '" & e.DataRow ("企业名称") & "' And 年度 = '"& e.DataRow("年度") &"'")
或者
if Tables("安全费用使用").current isnot nothing then
Dim r2 As DataRow = DataTables("安全费用提取").find("企业名称 = '" & Tables("安全费用使用").current ("企业名称") & "' And 年度 = '"& Tables("安全费用使用").current ("年度") &"'")
If r2 IsNot Nothing Then
e.DataRow("本月应提额") = r2("每月提取额")
Else
e.DataRow("本月应提额") = "0"
End If
end if