+ Reply to Thread
Results 1 to 6 of 6

Open MS Access database from Excel

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Open MS Access database from Excel

    Hi,

    I would really appreciate help with a problem. I am trying to use VBA in Excel to open an MS Access database. The code works but when the code attempts to quit Access it takes 20 seconds. I have commented out code and I can repeat the problem with just a few lines of VBA and a database with only 1 table. I am using Office 365, 32-bit.

    The trimmed down VBA code is as follows. When "acApp.Application.Quit" is executed it takes 20 seconds.

    Please Login or Register  to view this content.


    I have uploaded trimmed-down versions of the Excel workbook and the database.

    Thanks in advance.
    Alan
    Attached Files Attached Files
    Last edited by alansidman; 07-17-2020 at 12:40 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Open MS Access database from Excel

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,133

    Re: Open MS Access database from Excel

    I don't have MS Access installed on my laptop but, when i looked in your Access file with VBA i see there is one table named "Table1" and an empty field named "ID".

  4. #4
    Registered User
    Join Date
    09-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Open MS Access database from Excel

    Quote Originally Posted by Haluk View Post
    I don't have MS Access installed on my laptop but, when i looked in your Access file with VBA i see there is one table named "Table1" and an empty field named "ID".
    Hi Haluk,
    thanks for your response. I still get the same 20 second delay if I give a name to the ID.

  5. #5
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,133

    Re: Open MS Access database from Excel

    What do you mean by "giving a name to ID" ?

  6. #6
    Registered User
    Join Date
    09-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Open MS Access database from Excel

    Quote Originally Posted by Haluk View Post
    What do you mean by "giving a name to ID" ?
    I mean I have renamed the ID field. Further I have added another field and the record has been populated. It still takes 20 seconds to execute "acApp.Application.Quit"

    Do you see anything wrong with the VBA?

+ 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. Unable to open Access database from Excel
    By rakul_rakul in forum Excel General
    Replies: 0
    Last Post: 02-09-2017, 09:48 AM
  2. [SOLVED] Open Access Database From Excel
    By djfatboyfats in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2015, 08:45 AM
  3. Open Access database from Excel VBA?
    By proepert in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-08-2010, 11:14 AM
  4. Can you open Access Database through Excel VBA?
    By dj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-08-2006, 08:35 PM
  5. [SOLVED] Open Access database through excel
    By tinybears in forum Excel General
    Replies: 0
    Last Post: 05-03-2006, 06:55 PM
  6. [SOLVED] Open Access Database from Excel
    By Manuel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2006, 03:30 AM
  7. Open Access Database through Excel
    By jojo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2005, 03:06 PM

Tags for this Thread

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