Suppressing Error Messages

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

Guest

I have created my own alert for when someone accidentally tries to input a
duplicate record in a data entry form. My question is, how do I supress the
automatic alert that also comes up? If it requires VB, can someone give me an
example?

For this purpose anyway, the Form will be titled DataForm, the table will be
Data and the indexed field will be Junk.

Thank you.
 
docmd.setwarnings false
your code
docmd.setwarnings true
if you turn warnings off be sure to turn them back on asap.
 
Back
Top