How to disable dialog boxes?

P

Petter

I have the following problem: when I run a script with a sql query that
deletes a row in a table, a dialog box pops up and asks if I really want to
delete the row. How can I disable that box?
 
D

Douglas J. Steele

Use DoCmd.SetWarnings False before running the SQL (and DoCmd.SetWarnings
True afterwards)

If this is an MDB or MDE you're talking about, it's better to use the
Execute method of the Database or QueryDef objects.
 
S

Sylvain Lafontaine

Another possibility would be to uncheck the "Record Changes" Confirm option
under the Edit/Find tab in the Toos | Options menu.
 
A

Aaron Kempf

I believe that if you use this

CurrentProject.Connection.Execute

it won't prompt

there's some sort of really easy trick like that.. I assume right now that
you're using DOcmd.RunSql?
 

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