>I have a table that has a candidate key on Name. The Name is made candidate to keep the user from entering a duplicate name, a requirement for this app. The client has complained about the error message that comes up when trying to save the record with a duplicate name. It reads:
>
>Uniqueness of index
is violated
>
>and gives the cancel/suspend/ignore/help. I would much like to bypass that message with a custom one. Not only are some of the options unsavory for the app, it does some other harmful things to it.
>
>Steve
You should trap the error, e.g.
cError=on("ERROR")
lErrorflag=.f.
on error lErrorflag=.t.
**** your record saving code here
on error &cError.
if lErrorflag=.t.
**** your error trapping options
=messagebox("Cannot Save...")
endif
Edward Pikman
Independent Consultant