Access Messages

N

Nuno Gomes

Hello,

I need to perform inserts and deletes in several tables of my MDB in a form.
I'm using the command DoCmd.RunSQL = "..."
But i have a problem: when a do a delete statement, appears the mesage: "You
are going to delete x records... bla, bla. bla";
If i do a insert statement, appears the message: "You are going to insert 1
record to the table... bla, bla, bla...";
They are Access messages... How to disable this messages????....


Thanks,

Nuno Gomes
 
F

fredg

Hello,

I need to perform inserts and deletes in several tables of my MDB in a form.
I'm using the command DoCmd.RunSQL = "..."
But i have a problem: when a do a delete statement, appears the mesage: "You
are going to delete x records... bla, bla. bla";
If i do a insert statement, appears the message: "You are going to insert 1
record to the table... bla, bla, bla...";
They are Access messages... How to disable this messages????....

Thanks,

Nuno Gomes

DoCmd.SetWarnings False
DoCmd.RunSQL "Your SQL Here"
DoCmd.SetWarnings True

Or better yet, don't use RunSQL...

CurrentDb.Execute "Your SQL Here.",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