You could use:
Application.SetOption("Confirm Action Queries"), False
Turning SetWarnings off would also work.
A better idea might be to use DAO to Execute the queries instead of RunSQL.
The advantage is that you can ask to be notified if query does not complete
for some reason (e.g. someone is editing a record you tried to update or
delete). The disadvantage is that DAO cannot use the Expression service to
resolve something like Forms!MyForm!MyTextbox *inside* the SQL string, so
you have to use:
strSQL = "... WHERE MyField = " & Forms!MyForm!MyTextbox & ";"
To execute the string:
dbEngine(0)(0).Execute strSQL, dbFailOnError
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Rob LMS said:
I have an Access database that I distribute to multiple users. The forms
contain modules that include action queries. Instead of instructing the
individuals to "globally" turn off confirmations in Tools | Options (as this
will affect all their Access applicatons) I would like to program Access to
turn off these confirmations just for this database application.