View Full Version : Edit access's message


ALAN
06-02-2001, 07:06 PM
How to change this message with the message of my own "You tried to assign a Null Value to a variable that is not a variant data type."

AlanS
06-04-2001, 05:25 AM
You need to use error trapping, similar to the following code. Replace [whatever] with the actual error code number of the error you want a custom message for, and [your custom error message] with the actual message you want displayed.

On Error Goto Error_Label
'code that may generate error goes here
Done_Label:
Exit Sub
Error Label:
If Err.Number = [whatever] Then
Msgbox [your custom error message]
Else
Msgbox Err.Description
End If
Goto Done_Label

Rich
06-04-2001, 09:11 AM
Isn't that assuming that it's a trappable error in the first place?