change system warnings

JCross

Registered User.
Local time
Today, 06:14
Joined
Feb 28, 2002
Messages
116
Hi all. I have a number of forms where the user enters data where the number/name entered must be unique to the vendor/etc. So when the user enters a number that has already been used and there is a key violation, they get a system message that is rather cryptic explaining the situation.

I want to change this message to something more user friendly, but I can't trap the thing! It comes up when, in continuous form mode, the user tries to move out of the record with the violation.

How can I change this message??

Thank you!


Jennifer
 
Not sure how your DB is setup, but you could use a msgbox and if...then...else statement to trap it...kinda like this

if num = another number in the num field then
msgbox "You have entered a duplicate number."
end if
 
Thanks for the responses. I'll check out the link - and the reason I can't trap it is because I tried the error handling method and I can't figure out what event is triggering the message! Went through everything I could think of....

[This message has been edited by JCross (edited 05-13-2002).]
 
Memnoch's suggestion was an abstract version of the code you'll find in that link. Basically what it does is check that the key is unique, if not it Cancels it and gives the user a slightly more helpful message. This should be done from the BeforeUpdate event of the key field, otherwise you won't get the message until you try to leave the record, as you've seen so far.
 
Thank you for clearing that up a little, David...I was having some trouble understanding.

After I got the data types right - it worked perfectly.

THANK YOU

Jen

[This message has been edited by JCross (edited 05-16-2002).]
 

Users who are viewing this thread

Back
Top Bottom