Is it possible to run an update query using VBA and have it NOT ask if you are sure you want to run an update query?
Is it possible to run an update query using VBA and have it NOT ask if you are sure you want to run an update query?
CurrentDb().Execute YOURQUERY, dbFailOnError
...will not issue warnings.
For some reason that did not work. Here is exactly what I entered
CurrentDb().Execute qrySignOffUpdate_Phase2, dbFailOnError
When you say "that did not work", what happened? What does the rest of the code in that procedure look like?
Sorry for the vagueness. I got an error message
"Run-time error '3708':
The Microsoft Office Access database engine cannot find the input table or query:. Make sure it exists and that its name is spelled correctly."
The update query does exist and it is spelled correctly. I also tried putting quotations marks around the query, that didn't work either. And that is the only thing I have in my subroutine thus far. The whole thing is as follows:
Private Sub UpdSignOff_Click()
CurrentDb().Execute qrySignOffUpdate_Phase2, dbFailOnError
End Sub
It is the default and should be checked in ac2007 but is there a reference set to the DAO library? I take it you can run the query from the database window, correct?
No, I do not believe there is a reference to the DAO library. I searched the module for "DAO" with no results. And yes when I run it from the database window or from a macro it works great with the exception that it requires me to hit "yes" every time I run it.
Here's an example of how to check:
http://www.btabdevelopment.com/main/...1/Default.aspx
...and it is the Microsoft DAO 3.6 Object Library that needs to be checked.