Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

How To Get *just* Update Query Confirmation

Discussion in 'Information Technology' started by Sean S - Perth, WA, Jul 28, 2006.

  1. Sean S - Perth, WA

    Sean S - Perth, WA
    Expand Collapse
    Guest

    Hi all,

    When I run an update query Access warns me I'm about to run an update query
    then stops again and tells me how rows are about to be updated. 2 warnings.

    How do I get it to just give the one (sensible) warning?

    Unticking the Edit/Find Confirm option removes the warning altogether. FFS.

    Is that my only choice, 2 warnings or no warning?


    --
    Sean.
     
  2. Loading...

    Similar Threads Forum Date
    Self Update On The Gurdwara Blogs Apr 3, 2017
    Sikh News BREAKING: Young Sikh Shot Dead In Jalalabad, Afghanistan . - Sikh24 News & Updates Breaking News Oct 2, 2016
    Update Blogs Oct 16, 2015
    Update Wikipedia Enteries On Sikh Socio-Political Topics Breaking News Jul 19, 2015
    Pacific Oil Slicks Spotted In Search For Missing Malaysia Airlines Plane (Live Updates) Breaking News Mar 8, 2014

  3. OP
    Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    How are you running this query?

    If you use the Execute method, you can:
    a) avoid the unnecessary warning;
    b) get any failure message;
    c) get the number of records affected;
    d) use a transaction and rollback if desired.

    The disadvantages of the Execute method are:
    a) You need to resolve any parameters before the execute.
    b) There is more work in getting the transaction right.

    Basic code to exeute Query1 and report the results:
    With dbEngine(0)(0)
    .Execute "Query1"
    MsgBox .RecordAffected " record(s) inserted."
    End With

    The parameters issue applies only if your query contains something like:
    [Enter a date]
    or
    [Forms].[Form1].[Text0]
    My preference is to build the SQL string to concatenate these values in, and
    execute the string rather than a saved query.

    For an example of how to get the transaction right, see
    Archive: Move records to another table
    at:
    http://allenbrowne.com/ser-37.html
    The example shows how to execute 2 transactions and roll them both back, but
    the process is the same for a single transaction.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Sean S - Perth, WA" <SeanSPerthWA@discussions.microsoft.com> wrote in
    message
    news:FECE94D6-2160-43BE-9DA2-6263B3A821B2@microsoft.com...
    > Hi all,
    >
    > When I run an update query Access warns me I'm about to run an update
    > query
    > then stops again and tells me how rows are about to be updated. 2
    > warnings.
    >
    > How do I get it to just give the one (sensible) warning?
    >
    > Unticking the Edit/Find Confirm option removes the warning altogether.
    > FFS.
    >
    > Is that my only choice, 2 warnings or no warning?
     
  4. OP
    Sean S - Perth, WA

    Sean S - Perth, WA
    Expand Collapse
    Guest

    "Allen Browne" wrote:

    > How are you running this query?


    Yes, I should have specified.

    From the Queries listing.

    My post was more about how poorly warning the user is handled by Access.
    IIRR previous versions of Access handled this occurence with a single warning.

    Basically all I want to know is how many records are updated with having to
    go through a warning clicking 'frenzy'.

    The first warning says 'to prevent this message from appearing...' when what
    it should actually say is 'to prevent this message *and* the next message
    from appearing...'.


    --
    Sean.
     
Since you're here... we have a small favor to ask...     Become a Supporter      ::     Make a Contribution     


Share This Page