Results 1 to 5 of 5
  1. #1
    M0RDANT is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    2

    Cool excel link with access differs from simple export from access

    I have a wierd one. I am running a query in Access 2010. This query is using an IIF function in the expression. The query runs great. So I have an Excel spreadsheet which I want to link to the query. I link great, it pulls in the data; however, in cases which would trigger the IIF function, those are not polling correctly.


    I have multiple sheets in the workbook and have use the IIF feature on those as well (different lookup) and they work fine.
    If I export the data straight to excel (no linking) from access all data is correct.

    What gives??

    Rich

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Can you give an example of the data that and the iif statement that is working vs the iif statement that is not working?

    You may be using a name that is reserved in Excel that is not reserved in Access.

    Also what exactly are you expecting to see and what do you actually see? is the field coming up blank or with some sort of error message? Is the field in excel formatted correctly to show the data from Access (for instance if you're linking a date field and you have 7/12/11 you may get a number rather than a date.

  3. #3
    kevins is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    26
    I don't have an IIF feature in my query, however I am trying to accomplish the same thing that you have accomplished. I am not an expert with writing VBA or macros, so I am just trying to figure it out by trial and error. I have a query that I want to link to an existing excel spreadsheet. Can you help?

  4. #4
    eugenerobitaille is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    1
    Hello Mordan,
    I have the same problem with iif statement and it's a bug. My iif statement is really simple.
    Example:
    Releve: IIf([EndroitEntrepose] Like "*without*","without","with")
    I can get the appropriate result in Access, but when I get the data into Excel, all my lines will give me "with" value witch means the IIf statemment always give a "false" response to the iif statement. Keep me posted if you have an answer....

  5. #5
    heidiatmn is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    5
    Quote Originally Posted by M0RDANT View Post
    I have a wierd one. I am running a query in Access 2010. This query is using an IIF function in the expression. The query runs great. So I have an Excel spreadsheet which I want to link to the query. I link great, it pulls in the data; however, in cases which would trigger the IIF function, those are not polling correctly.
    I have multiple sheets in the workbook and have use the IIF feature on those as well (different lookup) and they work fine.
    If I export the data straight to excel (no linking) from access all data is correct.

    What gives??

    Rich

    Have you found a way around this? I am having the same problem.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Simple export for the Access novice
    By VictoriaAlbert in forum Import/Export Data
    Replies: 4
    Last Post: 06-15-2011, 01:33 AM
  2. Link Excel to Access problem
    By gg80 in forum Access
    Replies: 1
    Last Post: 02-22-2011, 09:35 AM
  3. link between excel and ms-access
    By Bala Preetha in forum Access
    Replies: 1
    Last Post: 11-28-2010, 08:23 PM
  4. Access link to excel file
    By delkath in forum Access
    Replies: 3
    Last Post: 09-13-2010, 12:28 PM
  5. Export a simple query result to an excel file
    By wop_nuno in forum Import/Export Data
    Replies: 1
    Last Post: 05-21-2009, 04:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums