Suppress Warning Message in RUNSQL ..Update query

A

Ashu

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
 
R

Rick Brandt

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
 
S

Steve Schapel

Ashu,

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