Private Sub Form_BeforeUpdate(Cancel As Integer) If DCount("*", "tblContacts", "lastName = """ & Me!txtLastName _ & """ And firstName = """ & Me!txtFirstName & """") > 0 Then If MsgBox("There is already a user by that name in the table." & _ " Do you wish to add it anyway?", vbYesNo) = vbNo Then Cancel = True End If End If End Sub