Suppress Warning Message in RUNSQL ..Update query

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

Guest

In my vb code I am running an update query, when I run this using a command
button from my form it displays the usual information message
" xxxx number of records will be updated, do you want to continue....."

How do I prevent my app from displaying this message?

Thanks,

Ashu
 
Ashu said:
In my vb code I am running an update query, when I run this using a command
button from my form it displays the usual information message
" xxxx number of records will be updated, do you want to continue....."

How do I prevent my app from displaying this message?

Instead of using DoCmd.RunSQL use...

CurrentDB.Execute "QueryName", dbFailOnError
 
Ashu,

Put this before your DoCmd.RunSQL line...
DoCmd.SetWarnings False
.... and after it, put...
DoCmd.SetWarnings True
 

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

Back
Top