Duplicate Value Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top