andrep,
I create a function in a standard module; i.e., Module1 which uses a select statement as listed above. While programming, I find error conditions which I have yet to trap. I add the condition to my function which returns a user friendly error message of my design. The advantage is that I call this function from all my error handling routines at the end of the sub. If I later need to change a message, I only have one place to go, not numerous forms and subroutines. I pass the error number to the function and return the custom message. Your error message are standard throughout your program. Mainly though, you don't have to keep writing the same message over and over.
mac