Results 1 to 9 of 9
  1. #1
    Tom123 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    11

    Disabling query warnings

    Hello,



    I would like to disable the query warnings when I run append, create table and delete queries. It needs to be disables for the sheet, not just for my copy of access, because other people will be using the database.


    Tom

  2. #2
    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 can be done if you run queries in code (macro or VBA) but not if you run them from the navigation pane.

    DoCmd.SetWarnings = False
    ...
    DoCmd.SetWarnings = True

    or use:

    CurrentDb.Execute "DELETE FROM tablename"
    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.

  3. #3
    Tom123 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    11
    I am not sure how to do that. I'm running a bunch of queries in a macro but I dont know where to put that DoCmd thing.

  4. #4
    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
    I showed VBA. The SetWarnings can be done in macro. Set False before running the queries and then set True afterward.

    Why are you running create table queries?
    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.

  5. #5
    Tom123 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    11
    I cannot find SetWarnings. Is it supposed to be in the Add New Action drop down? Because if so Its not there.

  6. #6
    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
    Click the Show All Actions button on the Macro Tools ribbon Design tab.
    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.

  7. #7
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I can't look at A2010 right now, but in A2000 you can turn off warnings for record changes, document deletions and action queries.

    OPTIONS
    Edit/Find tab
    There is an outline "Confirm" that has check boxes for record changes, document deletions and action queries.

    Access should have the same options in the backstage(??)... (FILE / Options / ....)
    *** use at your own risk. ***

  8. #8
    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
    Found under File > Options > Client Settings. This is an application setting that would have to be done for each user's install of Access and will affect all databases they open.
    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.

  9. #9
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I didn't say it was a GOOD option .... just that it is available..

    And I wouldn't/don't use it.....

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

Similar Threads

  1. Macro - how to turn off warnings for action queries
    By msmithtlh in forum Programming
    Replies: 3
    Last Post: 03-22-2013, 11:00 AM
  2. Turn OFF Warnings in Access 2010
    By taimysho0 in forum Programming
    Replies: 3
    Last Post: 01-27-2012, 05:47 PM
  3. Errors but not warnings ?
    By asearle in forum Access
    Replies: 3
    Last Post: 08-10-2011, 01:26 AM
  4. Turn warnings off
    By Mclaren in forum Programming
    Replies: 6
    Last Post: 05-03-2010, 12:07 PM
  5. Set Warnings Off
    By NMJones in forum Access
    Replies: 2
    Last Post: 04-12-2010, 03:06 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