Re: Delete/Update prompts



Well yeah, but currently all my stuff is for myself (I'm self-employed.)

David H
(VERY LONG several days)

Mark M wrote:
I used to do this too. But what happens if the query pukes and causes an error where you're presented with the good ol' "Debug or End" prompt? It would be good to have some basic error handling in place to set the warnings back to true in the event of an error. But, I'm sure we all have at least some rudimentary error-handlers in each procedure. :-)

"David C. Holley" <DavidCHolley@xxxxxxxxxxxx> wrote in message news:OtgahzGRFHA.2356@xxxxxxxxxxxxxxxxxxxxxxx

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: Great SWT Program
    ... query in a few tools. ... I said the / prompt comes up blank. ... arrows, delete, and cancels if you hit esc. ... a command history I had had occasion to use for months wishing it had ...
    (comp.lang.java.programmer)
  • Re: Error Messages
    ... not he wants to run a delete query. ... To avoid the confirmation prompt, ... or use the Execute method of either the Database ... This table contains a record with the initials of each user that is logged ...
    (microsoft.public.access.setupconfig)
  • Re: Closing an Empty Form
    ... Just as an experiment, can you temporarily alter the query by removing the three criteria that reference the main form, i.e. ... I don't know for sure that the system would prompt for all 3 of the combo-box fields because as you noted, the system crashes after I cancel the first prompt. ... I'm using WinXP and I also did a system restore at one point when I was loading programs onto the new computer. ...
    (microsoft.public.access.queries)
  • Re: Error Messages
    ... not he wants to run a delete query. ... To avoid the confirmation prompt, ... or use the Execute method of either the Database ... This table contains a record with the initials of each user that is logged ...
    (microsoft.public.access.setupconfig)
  • Re: Access 2000 Query using "Between Operator"
    ... Post the SQL String of your Query. ... Van T. Dinh ... I would like to thank you for your response. ... >>> have tried enclosing the Prompt field with a Val ...
    (microsoft.public.access.queries)