Results 1 to 4 of 4
  1. #1
    james28 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    92

    Surpress Action Query Alert

    Hello All!


    In Access 2010, I have a very basic setup:

    A table (of course!)
    An update query (looks for a set of conditions and changes some data if condition is met)
    A form (has a few comboboxes and a run report button)


    A report that shows a chart based on all of the above.



    I have everything working as I would like, with one exception. I have added


    Private Sub Form_Open()
    DoCmd.OpenQuery "UpdateOldQuery"
    End Sub





    When the form is opened, the query shoots off and updates the database. Well, that's the idea at least.

    It would work, but Access kindly alerts the user and lets them know that what they are about to do could change the data and asks if they would like to continue.


    I know that I can surpress this message using Access's options; however, it is my understanding that this is only good for the local machine. Is there some way, using code presumably, to suppress the message at the database level, so that absolutely anyone that opens the database/form will never get the message and it will always run?





    Thank you in advanced!

  2. #2
    james28 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    92
    I was able to figure it out. It was easier than I thought!

    Private Sub Form_Open()
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "UpdateOldQuery"
    DoCmd.SetWarnings True
    End Sub



    Cheers!

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    This version doesn't require the SetWarnings lines:

    CurrentDb.Execute "UpdateOldQuery"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    james28 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    92
    June,

    I appreciate it. Thank you!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Action Query Question
    By dargo72 in forum Queries
    Replies: 6
    Last Post: 11-16-2012, 09:51 AM
  2. Action Query Not Taking Data From Form
    By School Boy Error in forum Queries
    Replies: 3
    Last Post: 10-08-2012, 01:52 PM
  3. Using Form data for an Action Query
    By School Boy Error in forum Queries
    Replies: 6
    Last Post: 10-03-2012, 12:18 PM
  4. Create an alert
    By ellixer in forum Programming
    Replies: 2
    Last Post: 06-13-2011, 08:30 AM
  5. Replies: 2
    Last Post: 10-01-2009, 03:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums