Re: Update Query Confirmation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Brandon M (awktane_at_telus.net)
Date: 02/21/04


Date: Sat, 21 Feb 2004 16:37:39 GMT

Alright. The second way kept on giving me an error of Too Few Parameters or
something like that. I am assuming that it is because the SQL statement is
not formatted as required somehow... Anyways I saved the query and now am
not sure how to refer to it in the execute statement. I am trying the second
way because I need error checking of some kind and if I am not mistaken the
DoCmd.RunSQL does not allow for that.

"Ken Snell" <kthissnellis9@notcomcast.realnet> wrote in message
news:%23ow5LMD%23DHA.2168@TK2MSFTNGP12.phx.gbl...
> Two ways:
>
> (1) Precede your DoCmd.RunSQL command with this code step to turn them
off:
> DoCmd.SetWarnings False
>
> Then succeed your command with this code step to turn them back on:
> DoCmd.SetWarnings True
>
>
> (2) Use the CurrentDb.Execute "SQLStatement" code step to run the query.
If
> you want to have it "fail on error", then use this line:
> CurrentDb.Execute "SQLStatement", dbFailOnError
>
>
> --
> Ken Snell
> <MS ACCESS MVP>
>
> "Brandon Mackie" <awktane@telus.net> wrote in message
> news:sZAZb.42444$Hy3.30550@edtnps89...
> > I am incredibly new to access and trying to learn as I go. I have set up
a
> > few queries one of which is executed by a docmd.runsql in visual basic.
> > Because it is an update query it asks for confirmation every time it
wants
> > to update the table. Is there any way to get around this?
> >
> >
>
>



Relevant Pages

  • RE: Event procedure does not execute without break point?????
    ... I am not familiar with that command. ... > whoever answers will probably ask as I have what you need to accomplish. ... I will further assume that the SQL statement works in an ... >>> update query, but not from a command button. ...
    (microsoft.public.access.forms)
  • Re: Updating Multiple records based on values
    ... The SQL statement for the update query might ... digit code is trimmed and then run a special SQL update to set the ... State field correctly, but I haven't been able to get it working. ...
    (microsoft.public.access.modulesdaovba)
  • Re: "Select All" control in continuous form
    ... I do have one other question - when it runs I get a standard message saying ... I have a continuous form which users can input the name of an activity ... One thing you could try is to use an SQL statement ... The Click event is the event that fires when a command button is clicked. ...
    (microsoft.public.access.forms)
  • Re: update queries and forms
    ... > should enter an incorrect account number. ... > and makes your validation much easier. ... > OK - so what we want the command button to do is to run the update query. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Fast Update 10,000 Access records
    ... the original table has recoreds ... going to send a command to the db provided you have a respective command ... > From: William Ryan eMVP ... > If speed is the issue, once SQL Statement is going to be much faster. ...
    (microsoft.public.dotnet.framework.adonet)