Duplicate Value Error

K

kinlye

I have a form with several fields on it, but the two this pertains are CC#
and Item#

Both of these two are key fields in the underlying table. Of course when I
enter a duplicate item # for the same CC#, I get the duplicate value error
message.

I want to totally get rid of that message as there are people that will be
using this that barely know to double click a folder to open it. It will
severly confuse them.
I set up an error handler to take care of it and I want it to then insert
the cursor in the item # field so that the person can change the Item #.

When I set up an error handler, it does bring up my custom msgbox, but when
I click okay there the Microsoft Error comes up.

Any help would be greatly appreciated. If more information is needed,
please let me know.

J
 
M

mscertified

Dont allow the error to occur!
Set up a 'before update' event for those fields to query the table and
detect the duplicate before Access attempts to add it to the table

Dorian
 
Top