Results 1 to 4 of 4
  1. #1
    Wormling is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2016
    Posts
    2

    Pre-Authorization of Make Table with Multiple Queued Queries


    Sorry if this has been asked and answered elsewhere - I assume I'm not the first to encounter this problem, but haven't had luck finding the answer either here or with google search.

    I have several queries that make local tables from linked odbc tables. I am trying to get them to all update overnight as it takes ~3 hours per table, and this kills productivity having to sacrifice a day each week to updating my local tables. Currently, thanks to others' help and googling, I have the following setup:

    Sub RunAllQueriesMacro()
    DoCmd.OpenQuery "Query-MakeLocalA"
    DoEvents
    DoCmd.OpenQuery "Query-MakeLocalB"
    DoEvents
    End Sub

    Example shortened to two as the command repeats, only changing query name. This works fine except that each and every single query will pause, have a popup saying that it will modify data, and ask for approval. Having to manually approve each query before it runs defeats the purpose of this macro. Is there any way to pre-approve these queries to run and make local tables?

    Thank you for your time and any and all assistance.

  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
    Check out SetWarnings.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Wormling is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2016
    Posts
    2
    Thank you kindly pbadly for the quick reply. That does appear to be exactly what I was looking for. Will try it out tonight.

  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
    Happy to help and welcome to the site by the way! Don't forget to turn warnings back on after running all the queries. Also, personally I'd be more likely to empty/populate existing tables rather than making new ones every time.
    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: 12
    Last Post: 06-19-2015, 10:02 AM
  2. Replies: 2
    Last Post: 02-12-2015, 06:27 PM
  3. Replies: 3
    Last Post: 01-21-2014, 12:28 AM
  4. Refreshing Make table queries within a form?
    By umass02 in forum Queries
    Replies: 2
    Last Post: 09-03-2010, 09:14 AM
  5. Add descriptions for make table queries
    By HurrMark in forum Access
    Replies: 0
    Last Post: 12-30-2008, 08:29 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