以下是引用狐狸爸爸在2009-5-8 14:35:00的发言:
可能这样合适点:
If e.DataCol.Name = "上级项目名称" Then
Dim dr As DataRow
dr = DataTables("项目明细").Find("[工程序号] = '" & Tables("项目信息").Current("序号") & "' and [项目名称] = '" & e.datarow("项目名称") & "'")
If dr isNot Nothing AndAlso dr.IsNull("项目名称") then
e.datarow("选择标记") = False
Else
e.datarow("选择标记") = true
End If
end if
dr = DataTables("项目明细").Find("[工程序号] = '" & Tables("项目信息").Current("序号") & "' and [项目名称] = '" & e.datarow("项目名称") & "'")
与
dr = DataTables("项目明细").Find("工程序号 = '" & Tables("项目信息").Current("序号") & "' and 项目名称 = '" & e.datarow("项目名称") & "'") '去掉[]
两者有和区别?
[此贴子已经被作者于2009-5-8 20:36:47编辑过]