Search notes:

Access: DoCmd.RunSQL

doCmd.runSQL executes an SQL statement (DML and DDL, aka action query).

Suppress «You are about to append … row(s)»

If runSQL is used to execute an insert statement, by default, Access pops up a message box with a You are about to append … row(s) message:
In order to stop Access from displaying this message box, doCmd.setWarnings false must be executed beforehand.
Arguably, not displaying warnings is a bad idea. So a better idea to execute SQL statements might be use
currentDB.execute "alter table tab_foo add column col_bar int"

create view statement not supported

runSQL cannot be used to create views.

See also

The doCmd object and its openQuery method.

Index