nerdcore
MIS
- Jan 23, 2003
- 26
I would like to trap the primary key violation error when a user enters a duplicate name on a form. My table is set up with a FranchieNumber field that is the primary key. This field is bound on a Form.
If a user enters a duplicate FranchiseNumber they will get a key violation error when moving to the next record. Currently the error is not very user friendly, says "you have created duplicate entries in the index, primary key, or relationship.....remove the index...". This will freak out my users
. I'd like to trap this error and put up a MsgBox saying "You entered a duplicate Franchise Name. Please enter a unique number". How do I trap this error and where in the code would I do this? Is this even possible? Thanks!
If a user enters a duplicate FranchiseNumber they will get a key violation error when moving to the next record. Currently the error is not very user friendly, says "you have created duplicate entries in the index, primary key, or relationship.....remove the index...". This will freak out my users