You could trap the message in the Error event of the form.
DataErr will be 3022 for a duplicate index error.
Display your own MsgBox, and set Response to acDataErrContinue.
Alternatively, use Form_BeforeUpdate to DLookup() the existing record if you
prefer to avoid the failed write attempt.
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.