How to a Catch duplicate error

neoklis

Registered User.
Local time
Tomorrow, 01:11
Joined
Mar 12, 2007
Messages
80
Hi,

I have a front end Access and when I insert duplicate values becomes the error below. At which event can I catch the error?

Violation of PRIMARY KEY constraint ‘123’. Cannot insert duplicate key in object’ 678’

Thank you
 
You can check for duplicates in the Before Update event of the form.
 
Thanks for your reply but it is not working... I have tried the events of the form and the subform.. I have linked tables to SQL.. I am mentioning this, cause i dont know if i have to deal it with another way...
 
you need to be more specific - what code exactly have you tried in the before update event?
 

Users who are viewing this thread

Back
Top Bottom