Can query messages be suppressed ro turned off

R

rich

Hello,

I'm still pretty new at Access but it appears that whenever I execute a SQL
command, Access displays a message telling you what is about to occur. For
example, if I'm executing an INSERT query, Access display a message
indicating it's about to insert xx rows. Is there a way to turn off these
types of messages?

Thanks,
Rich
 
F

fredg

Hello,

I'm still pretty new at Access but it appears that whenever I execute a SQL
command, Access displays a message telling you what is about to occur. For
example, if I'm executing an INSERT query, Access display a message
indicating it's about to insert xx rows. Is there a way to turn off these
types of messages?

Thanks,
Rich

DoCmd.SetWarnings False
DoCmd.RunSQL "Insert into ......."
DoCmd.SetWarnings True

A better way might be to use the Execute method.
No need to turn off the Warnings.

CurrentDb.Execute "Insert Into ...", dbFailOnError
 

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