Private Sub 身份证编号_BeforeUpdate(Cancel As Integer)
Dim strMsg As String, strTitle As String
Dim intStyle As Integer
If Not IsNull(DLookup("[身份证编号]", "个人情况表", "[身份证编号]='" & Me.身份证编号 & " ' ")) Then
strMsg = "此身份证号码已存在,请重新检查输入!"
strTitle = "警告"
intStyle = vbOKOnly
MsgBox strMsg, intStyle, strTitle
Cancel = True
End If
End Sub