+ Reply to Thread
Results 1 to 6 of 6

Display Access union query results in excel

  1. #1
    Registered User
    Join Date
    02-08-2007
    Posts
    17

    Display Access union query results in excel

    hi

    i am trying to display the results of a union query in access...but when i try to link to the query from excel the union query is not selectable.

    any ideas?

    thanks

  2. #2
    Registered User
    Join Date
    02-08-2007
    Posts
    17
    i have found a solution i thought i would share

    In excel 2007 I was able to add a new ODBC connection (not the default MS Access one) and select the union query.

    Then under the "get external data" option select "existing connections" and select the connection you just created.

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can also do in two mode:

    one) you create a query in your access db and import it from excel as a table

    two)
    go in macro recording (choose menu tools, macro, record new macro),
    now choose menu data, import external data, new query on db and select some fields from a table you have on db and complete data import
    stop macro recording

    go in your macro and change the query including your union query. It will work without problems.

    Here an example of the recorded macro:

    Please Login or Register  to view this content.
    Regards,
    Antonio

  4. #4
    Registered User
    Join Date
    02-08-2007
    Posts
    17
    Thats a cool trick - thanks!

  5. #5
    Registered User
    Join Date
    10-19-2010
    Location
    Chennai, Tamilnadu
    MS-Off Ver
    Excel 2003
    Posts
    15

    Question Re: Display Access union query results in excel

    Hi ,

    Will this logic(recording a macro) work for excel 2003??

    thanks in advance

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Display Access union query results in excel

    Tamilvendhan,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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