Display Alerts - How Do you disable them in VBA?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Chillwa
    New Member
    • Feb 2008
    • 2

    #1

    Display Alerts - How Do you disable them in VBA?

    I am running/coding update queries in MS Acess VBA 2002
    and each update query asks the user to click "Yes or No" to verify they want to update the table.

    I do not want this user interaction (since there are alot of queries)

    How can I set the Display Alerts to FALSE (like in Excel) so that this box does not pop up asking the user if they want to update the table?

    or is there a way for me to hard code a line to automatically click "Yes" for the end user when this verification box/display alert pops up?

    I have searched for this answer and cannot find it. Thank in advance for ANY help. This project is due tomorrow Friday the 8th.

    Willis
  • Khriskin
    New Member
    • Feb 2008
    • 20

    #2
    DoCmd.SetWarnin gs False 'will turn off the popup warnings
    DoCmd.SetWarnin gs True 'will turn them back on

    Makes sure you turn them off when necessary as it will disable /all/ error and warning messages!

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32669

      #3
      Good answer, but you should understand that this is only for data type warning messages. This will not disable error messages as such.

      Comment

      • Chillwa
        New Member
        • Feb 2008
        • 2

        #4
        Thanks for the quick reply, it really helped - Everything is working fine now.
        I REALLY appreciate it. Thanks Willis

        Comment

        Working...