我为了实现在项目登记表中登记项目时,通过快捷菜单向另外一个表(项目名称)添加当前项目名称,但同时要判定项目名称表中是否存在该项目名称。但这个代码始终通不过,请教该如何修改?Dim pr As Row = tables("项目登记表").current
If pr.IsNull("项目名称") Then
Dim dr As Row = Table("项目名称").find("[项目名称]='" & pr("项目名称") & "' ")
If dr Is Nothing Then
Dim sr As Row =Tables("项目名称").AddNew()
sr("项目名称") = pr("项目名称")
Else
MessageBox.Show("此项目已经存在!")
End If
End If