>Hi,
>I'm using the Mere Mortal way of checking for a unique ID, but the built-in message leaves me with a ??? feeling. I'd like to be able to change the message so it makes more sense to the user. For instance "The customer number is already on file.", I've looked around the documentation and I don't see how to do this. Can anyone help me with this? I would appreciate any help.
>Ed
This is the code that is run to display the message from the cTextboxl class:
Method UniqueValue:
IF TYPE('This.TextBox.Value') = 'C'
lcSuffix = "'" + ALLTRIM(This.TextBox.Value) + "'"
ELSE
lcSuffix = 'This'
ENDIF
*----------------------
*-- Display the message
*----------------------
=MsgSvc('NotUniqueValue', lcSuffix + '~')
The text for the meeage is coming from the MSGSVC table where the ckey field equals ''NotUniqueValue'. You could change the text in the cOriginal memo field. Right now it contains:
%C1% is not an unique value
Make sure and keep the %C1% in the message. This is a variable that contains the object's description which failed the unique value. also, make sure you make a note that you changed the table so future updates don't overwrite your changes.
Hope this helps.
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi