+ Reply to Thread
Results 1 to 2 of 2

Import Data from Access Query with Calculated Fields

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Import Data from Access Query with Calculated Fields

    Hi,

    I am trying to link my excel spreadsheet with an access query. The query has 3 calculated fields that has does dlookups that pulls information from various tables.

    I have tried using the "Get External Data" access button but I get an "Data could not be retrieved from the database. Check the database or conact your database admin ......" error. Once I delete the calculated field, this method works so I am sure that it's the calculated fields causing the problem.

    Would the issue be that one of the calculated fields uses DLookup and that is not an excel function?

    I have also tried with VBA with the code below, everything imports correctly excecpt for the 3 calculated column which all remain empty.

    HTML Code: 
    Last edited by PicoTTS; 03-10-2016 at 02:35 PM.

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

    Re: Import Data from Access Query with Calculated Fields

    Are you familiar with MS-Query? It's part of Excel and allows you to import data from any database for which you have a driver. There's a driver built in for text files, MS-Access and other Excel sheets among a couple other popular databases.

    The best way to use MS-Query is to develop the query on the Access side of the house and use it as your data source.

    This article will give you an idea about MS-Query: http://www.utteraccess.com/wiki/index.php/MS_Query.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Odbc table join or calculated fields in ms query excel
    By mwali23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2015, 01:01 AM
  2. Access Query with Calculated Fields Not seen by Excel
    By Xcelguy in forum Access Tables & Databases
    Replies: 12
    Last Post: 11-06-2013, 05:34 PM
  3. [SOLVED] Mapping fields in Excel to prepare them for Access import.
    By carden2 in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 10-04-2012, 08:10 PM
  4. Data import Problem: Access Query to Excel
    By Minder in forum Access Tables & Databases
    Replies: 1
    Last Post: 05-25-2009, 04:23 PM
  5. MS Query calculated fields
    By mkvassh in forum Excel General
    Replies: 1
    Last Post: 01-26-2009, 06:50 AM
  6. Open an Access database Import data like Microsoft Query
    By hilander in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2007, 06:55 PM
  7. import data from an Access parameter query
    By PluckyMo in forum Excel General
    Replies: 2
    Last Post: 04-11-2006, 11:50 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