Results 1 to 8 of 8
  1. #1
    Dgrazynski is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    4

    setwarnings not working

    Hi All,

    I am using Access 2013 (the newest access, just downloaded online) and can't seem to get this to work.
    I have a series of SQL queries that when they run it gives me the pop-up of "pass=through query..."



    I want to include these queries into a macro so that I don't have to continuously run each query. I have the current setup:

    setwarnings No
    Echo No
    OpenQuery Query 1, View Datasheet, Data Mode Edit
    .
    .
    .
    Echo Yes
    setwarnings Yes


    I have tried everything and also went to the trusted settings and made sure to add all the locations on my computer. Does anyone have any solutions?

    Thanks in advance.

  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
    What's the actual message? SetWarnings will stop the usual 2, which are something like "You're about to run an update..." and "The query will update x records" or something like that. Pass through is not something mentioned in the usual messages.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Dgrazynski is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    4
    Sorry, forgot to mention that.

    The macro stops running on the first openquery with the error code 2950

    The dialog box that pops up before that is the "pass-through query with returnsrecords property set to True did not return any records" So I was hoping that the setwarning No will just bypass that dialog box.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't think so (well, I guess it won't since it's not). Is there a reason you don't change that property of the query?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Dgrazynski is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    4
    How do I get rid of that property (pop-up box) in the query?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Presuming it's an actual pass through query, "Returns Records" is a property of the query. Try changing it to No.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Dgrazynski is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    4
    Oh yeah...wow. Thank you so much! Can't believe I didn't do that an hour ago.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 13
    Last Post: 01-22-2015, 05:27 PM
  2. Replies: 2
    Last Post: 01-02-2015, 06:55 PM
  3. Replies: 1
    Last Post: 12-27-2014, 12:38 PM
  4. SetWarnings turned off
    By Paul H in forum Programming
    Replies: 3
    Last Post: 03-28-2013, 07:47 AM
  5. Replies: 3
    Last Post: 01-29-2013, 04:34 AM

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