try
DoCmd.SetWarnings False
DoCmd.RunSQL
DoCmd.SetWarnings True
make sure you include that last line, since warnings will not be turned back
on automatically, as they are in a macro.
you can also use
CurrentDb.Execute "SQL string goes here"
without the need for the SetWarnings lines of code. but note that the
Execute action can result in a different outcome than the RunSQL or
OpenQuery actions, when the SQL statement appends records to a table.
hth
<kk*******@gmail.comwrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
Whenever I execute a sql command (using docmd.runsql), it always gives
a popup when executed asking if I want to confirm deleting 3 rows, or
updating 1 row, or whatever. Is there a way to prevent this popup from
appearing?