Results 1 to 6 of 6
  1. #1
    Join Date
    May 2004
    Posts
    159

    Unanswered: setting options from program help needed

    On our access 2003 it is set in the options that action queries need to be confirmed to run.
    I have a program that I want to roll out and it is getting stopped by that option warning the user about running the query and not allowing the query to run. I run the query in code and use docmd.set warnings false but it still brings up the warning requestor. I can turn that off in the options but that would have to be done on each computer. What's the best way to handle this.
    Thanks

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    if you want an unneccesarily exciting life, with users denying thery did anything, missing data andpossible corruption errors then look on the
    tools | options | edit/find tab
    ...and clear the confirm check boxes as required

    however I'd suggest turning it off/on selectively at runtime.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2004
    Posts
    159
    Quote Originally Posted by healdem
    if you want an unneccesarily exciting life, with users denying thery did anything, missing data andpossible corruption errors then look on the
    tools | options | edit/find tab
    ...and clear the confirm check boxes as required

    however I'd suggest turning it off/on selectively at runtime.
    How do I turn it off at runtime from code?

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Check the help file for SetWarnings.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by WilliamS
    How do I turn it off at runtime from code?
    Hi WilliamS,

    I have a database that runs Action Queries when processing my request, but instead of doing the SetWarnings thingy, I simply do this below:

    Code:
    stDocName = "LaunchPad.PostJobCharge"
        CurrentDb.Execute "PostJobCharge"
        CurrentDb.Execute "UpdateStockedItems"
    This (CurrentDB.Execute)disables the warnings from the ActionQueries (In " " are the Queries) ONLY while this request is running. Give it a spin and see what you get.

    have a nice one,
    BUD

  6. #6
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    The command that you can use to uncheck the box in the Options is:

    SetOption "Confirm Action Queries", False

    Run your query, then turn them back on:

    SetOption "Confirm Action Queries", True

    Just be sure to turn tham back on in your error trapping, in case an error occurs after you turned it off.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •