Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2012
    Posts
    9

    Question Link to MS Access Query Problem

    So I'm trying to set up a link in Excel 2007 to a query in a Access 2007 database but the result I get are the headers and 2 blank rows. When I check the query in Access, it comes through fine. Whats wrong? How do I fix the link?

  2. #2
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    749
    Hi

    I think a little more info is required, ie. what are you trying to achieve and what are you doing now that dosn't work?

    MTB

  3. #3
    Join Date
    Feb 2012
    Posts
    9
    I have a query that I've created in Access. Results are perfect. When I go to Excel and try to create a link to that query, none of the results show in Excel. I only get the header row and 2 blank rows. I can export the query to an Excel sheet, but I want the convenience of the refresh option.

  4. #4
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    749
    Yes that's fine, but how are you attempting to make the link?

    For instance, are you using VBA: if so could you post the code?
    In addition you could also post the SQL string of the query that woork in Access.

    MTB

  5. #5
    Join Date
    Feb 2012
    Posts
    9
    No, i'm just using the wizard. Data ribbon, Get External Data, From Access, browsing for my database and selecting the query I want to link.

  6. #6
    Join Date
    Feb 2012
    Posts
    9
    The only thing that I can think of is that the query is pretty complex (many joins, many iif statements) that it times out after a certain amount of time. does this sound logical?

  7. #7
    Join Date
    Dec 2012
    Posts
    1

    RE: Link to MS Access Query Problem

    I had the same problem as MikeTheBike. I set up a query in MS Access and then used the Data Wizard in Excel (go to Data -> Get External Data -> From Access) to import the data from Access, and I got two blank rows. When I refreshed that table, I got one blank row. I was able to import other queries, and I double checked to make sure that running this query in Access give me a non-null result.

    To fix this (and I don't know why this works, just that it did in this instance) I used "From Other Sources" instead of "From Access" in the data import, and used "From Microsoft Query". A small window pops up to allow you to pick an Access Database and then a query or a table within the database. And this worked.

    Again, I'm not sure why this worked, only that it did, so if there's an Excel-Access expert out there that can shed some light on this, I'd be grateful.

  8. #8
    Join Date
    Sep 2013
    Posts
    7
    I have same issue but in 2010. I can get the table to import fine but the query returns headers and 2 blank rows.

    I tried the 'from other sources' method suggested above but when I browse to select my data source the folder containing my Access Database is blank (no items match your search).

    My query isn't even complex, it just shows all rows from the main table that have data in one particular field (i.e gets rid of rows that have a blank in that field).

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
  •