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
 
Back
Top