Suppressing Error Messages

J

JBL

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

Guest

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

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

Top