Catch duplicate error when inserting into table and display msg

  • Thread starter Thread starter Akilah
  • Start date Start date
A

Akilah

If two users are insert the same, exact data into the same table and the
warnings are off, is there a way to capture and display the duplicate error?

Thanks
 
How are you inserting?

Perhaps you are using an append query statement (since you mention turning
warnings off.) If so, see:
Action queries: suppressing dialogs, while knowing results
at:
http://allenbrowne.com/ser-60.html

If you are using a bound form, your options are:
a) Use the Error event of the form; or
b) Perform a DLookup() in Form_BeforeUpdate.
 
Back
Top