To capture and replace the existing message, use the Error event of the
form. Unfortunately, that event does not tell you which control caused the
problem, and does not fire until there is an attempt to save the record.
Your other option is the BeforeUpdate event of the control itself. Use
DLookup() to see if *another* record has the same value, and if so, cancel
the text box's BeforeUpdate event.