Re: Delete/Update prompts

Tech-Archive recommends: Speed Up your PC by fixing your registry



DoCmd.SetWarnings False
DoCmd.RunSQL (or DoCmd.OpenQuery)
DoCmd.SetWarnings True

I'm in the habit of encapsulating the query to ensure that the warnings are always turned back on afterward as there are times that I want to see them, esp If I'm developing something or if theres the possibility that the user may run a query.

Jim wrote:
I have sql in vba that does update and deletes..when they trigger a prompt asking the user if they want to delete/update the table appears...How can I stop that from happening and just have the statement go through?

thanks
.



Relevant Pages

  • Re: Run query on form close
    ... Tips for Access users - http://allenbrowne.com/tips.html ... run the query and then turn it back on again. ... Access Help shows that I can turn off the warnings that> pop ... > section of the Macro window. ...
    (microsoft.public.access.formscoding)
  • Re: changed queries save automatically
    ... Check out Allen Browne's "bug" about Name AutoCorrect. ... A query not prompting you about saving it is one of the symptoms of this ... Either something else is turning off warnings or we're dealing with a bug ... Compacting and repairing closes the database and reopens it. ...
    (microsoft.public.access.queries)
  • Re: Update Query: SetWarnings Off
    ... I have created an Update Query and I want to turn ... off the "are you sure" warnings. ... Proc_Exit: Exit Sub ...
    (microsoft.public.access.queries)
  • Re: Table/Form/Query Question
    ... Those are the fields that are relevant to my warnings. ... The final query, the one that will be in my report and have the format that ... "Jeff Boyce" wrote: ... what your data structure looks like. ...
    (microsoft.public.access.queries)
  • Re: Access 2000 Make Table Query Warning Box -- use currentdb.exec
    ... that it effects the entire database? ... When this query is run, and before it asks the user for the input, I ... I have restarted the program multiple times. ... but the warnings keep coming up. ...
    (microsoft.public.access.queries)