suppressing alert messages

T

tvt

Hi,

I set a string variable equal to my "insert" query and run it with:

DoCmd.runSQL myStr

Everything works fine but there's alway an alert message that pops up
telling me that i'm adding a record. Is there anyway to suppress it? I know
in Excel it would be something like:

Application.DisplayAlerts = False

Thanks for the help!

T
 
S

Steve Schapel

T,

DoCmd.SetWarnings False
You should put a DoCmd.SetWarnings True line afterwards.
 

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