Results 1 to 6 of 6
  1. #1
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149

    VBA code to disable confirmation pop-up

    What VBA code to disable pop-up prompt for the yellow highlighted confirmation settings?
    Thanks.



    Click image for larger version. 

Name:	Screenshot.png 
Views:	18 
Size:	9.1 KB 
ID:	49496

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Are you looking for SetWarnings?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Maybe:

    DoCmd.SetWarnings False
    'do something
    DoCmd.SetWarnings True

    Or use CurrentDb.Execute method.
    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
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    If I want my Access to disable pop-up confirmations,
    I issue DoCmd.SetWarnings False when starting the program,
    then issue
    DoCmd.SetWarnings True when exit the program.
    do I right?

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    If by program you mean a procedure, yes. If you mean the application, then no.

    I've never really needed to do this. I use CurrentDb.Execute for VBA execution of SQL actions and don't have to worry about Warnings.
    Last edited by June7; 01-17-2023 at 03:57 AM.
    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.

  6. #6
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    Personally I wouldn't use setwarnings on app open (no need to use it on close) - it could hide all sorts of issues. You'll be back here asking why something isn't working, completely forgetting you have turned warnings off.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-11-2020, 06:05 PM
  2. Press Alt key to disable date-checking code in program
    By LindaRuble in forum Programming
    Replies: 2
    Last Post: 05-21-2013, 09:02 AM
  3. Code Error on Form To Disable Shift Key
    By burrina in forum Forms
    Replies: 3
    Last Post: 12-24-2012, 07:27 PM
  4. Replies: 3
    Last Post: 08-02-2012, 10:27 AM
  5. Confirmation on what I am doing
    By newtoAccess in forum Access
    Replies: 5
    Last Post: 12-10-2010, 01:01 PM

Tags for this Thread

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