Personally, I prefer the Execute method, and I would probably use the forms
close event. It could be as simple as the following:
Private sub Form_Close()
On Error goto ProcError
currentdb.querydefs("query1").Execute dbfailonerror
currentdb.querydefs("query2").execute dbfailonerror
currentdb.querydefs("query3").execute dbfailonerror
Exit Sub
ProcError:
debug.print err.number & vbcrlf & err.description
resume next
End Sub
In reality, I normally call a user defined function when I want to execute
an action query. The function accepts the name of the query to run or the
SQL string, and has an error handler that will write error messages to my
error log, display it to the screen, or both. It also returns a boolean
value indicating whether the action was successful, which I can then use to
determine what to do as the next step in my code.
As Karl mentioned, you could also execute a macro, put I prefer the control
that my method provides.