Duplicate values

peterbowles

Registered User.
Local time
Today, 10:42
Joined
Oct 11, 2002
Messages
163
If you are on a form and you add a duplicate value. you get MS horrible message can you get rid of this and have your own

thanks
 
I may be wrong but can you set the On Change event property or maybe the After Update property with your own error handling message? I'm not sure if it would disable the default access error message but maybe its worth a shot.

HTH
 
in the on error event of the form I put

Msgbox "You have already selected this part number. "
Me.PartNo.setfocus
Me.partNo.dropdown


It works ok but still produces the access error messages

Any Ideas
 
Peter,

You can use a DLookup on the BeforeUpdate event of
the PK field and trap the error if it exists.

There are many examples here, use the search.

Wayne
 

Users who are viewing this thread

Back
Top Bottom