+ Reply to Thread
Results 1 to 2 of 2

Excel connections to Access Queries not working

Hybrid View

  1. #1
    Registered User
    Join Date
    09-13-2013
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    7

    Excel connections to Access Queries not working

    I have an Excel workbook with about 8 worksheets connected to 8 different queries in the same access DB. I want these connections to auto refresh when I open the file.

    I got it all set up and I am getting an error because it is saying the DB is already open on my machine and to close it before proceeding. My guess is that it's opening the first connection to the first query and then trying the 2nd but it's not working because the first is still open. Any suggestions on what is going wrong here?

    Edit to add: I've kind of confirmed my theory. If I turn off refresh on opening, and turn off refresh all on refresh, then just refresh each worksheet one by one it will work.
    Last edited by Geetarzan; 01-14-2016 at 12:39 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Excel connections to Access Queries not working

    First of all, I can't reproduce the condition, but I have an idea for a work around. Turn off the background refresh and put code in an open workbook event to call them in order.

    ActiveWorkbook.Connections("Connection1").Refresh

    ActiveWorkbook.Connections("Connection2").Refresh
    ...
    ActiveWorkbook.Connections("Connectionn").Refresh

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 08-23-2013, 03:54 PM
  2. Can't find Access queries from Excel VBA
    By natefarm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2013, 10:50 AM
  3. Replies: 0
    Last Post: 01-21-2013, 12:47 PM
  4. Hide or disable access to Workbook Connections in Excel 2007
    By dpelizzari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2012, 09:59 AM
  5. Embedded Access queries in Excel - if the database moves, how to update queries?
    By Paul_mcc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-06-2012, 07:52 PM
  6. Executing queries in Access from Excel
    By Felipe99 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-22-2010, 04:33 AM
  7. cpu load excel with access queries
    By Ozz in forum Excel General
    Replies: 0
    Last Post: 07-25-2006, 03:20 AM
  8. [SOLVED] Excel Queries using Access data
    By baconroll in forum Excel General
    Replies: 1
    Last Post: 10-12-2005, 01:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1