If not isnull(DLookup("targ_name", "dbo_stat_basic", "targ_name='" & Trim(targ_name) & "'") <> "" And Not IsNull(DLookup("targ_name", "dbo_stat_basic", "targ_name='" & Trim(targ_name) & "'"))) Then
MsgBox "记录已经存在,操作取消!", vbOKOnly, "系统提示"
End If
Private Sub targ_name_BeforeUpdate(Cancel As Integer)
If DLookup("targ_name", "dbo_stat_basic", "targ_name='" & Trim(targ_name) & "'") <> "" And Not IsNull(DLookup("targ_name", "dbo_stat_basic", "targ_name='" & Trim(targ_name) & "'")) Then
MsgBox "记录已经存在,操作取消!", vbOKOnly, "系统提示"
End If