Here's one I use on Social Security numbers for a pop up when a duplicate....
SS# is stored in table "tblApplicant"
Code:Private Sub SocialSecurity_BeforeUpdate(Cancel As Integer) Dim Answer As Variant Answer = DLookup("[SocialSecurity]", "tblApplicant", "[SocialSecurity] = '" & Me.SocialSecurity & "'") If Not IsNull(Answer) Then MsgBox "Duplicate Social Security Number Found" & vbCrLf & "Please enter again.", vbCritical + vbOKOnly + vbDefaultButton1, "Duplicate" Cancel = True Me.SocialSecurity.Undo Else: End If End Sub
This was awesome, not a direct use but it got me headed in the right direction.