Supressing unwanted 'update row warning' dialog

B

Ben Hiett

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?
 
J

Joe Fallon

In code you can use:

DoCmd.SetWarnings False
'run query here
DoCmd.SetWarnings True
 
T

Tim Ferguson

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
 

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