Supressing unwanted 'update row warning' dialog

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

Guest

When running an SQL update from a subroutine, e.g.

DoCmd.RunSQL <update sql statement>

I get a dialog popping up warning me that a row is going to be updated and
do I want to continue (YES/NO)

Can I suppress/bypass this unwanted dialog box?
 
In code you can use:

DoCmd.SetWarnings False
'run query here
DoCmd.SetWarnings True
 
Can I suppress/bypass this unwanted dialog box?

db.Execute strSQL, dbFailOnError

This gives you _programmatic_ control of any errors that are produced,
rather than silently junking the update.

And you can have longer strSQL strings.

Hope that helps


Tim F
 
Back
Top