Error Msg, would create duplicate

A

Allen Browne

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.
 
Top