Personalized error appearing 2 times

When I try to add a register with a value thats already on the table I receive this error:

I want to modify it, so the user will know better what went wrong, but it turns out this error is two errors as in this image:

When I put a macro with the personalized error on the form control, it shows 2 times, is there a way to fix it?

This the macro im using:

REM  *****  BASIC  *****

Sub Error
Msg = "The inserted value is already on the table."

MsgBox Msg, , "Error: duplicate value."

End Sub

I find out that the first error is because it couldnt save the register, and the second one is because the table isnt allowed to accept duplicate values.