Yes, be sure that duplicates are allowed for the field in
its table and add the following code in the After Update
event for the field in your form:
Private Sub Title_AfterUpdate()
On Error GoTo Err_Title_AfterUpdate
If DCount
("[YourDataField]", "[YourQueryOrTableName]", "[YourDataFi
eld]=Forms!frmYourFormName![YourDataField]") <> 0 Then
Beep
MsgBox "Duplicate thing! Change the thing name or
click on the UNDO button" _
& " and enter an different thing.",
16, "Duplicate thing"
End If
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.