Results 1 to 6 of 6
  1. #1
    Xarkath is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Millcreek WA
    Posts
    92

    Import Issue

    Hello,

    We get weekly Excel files from clients that I wont to load to Access for tracking and reporting. The reports are consistently formatted and everything looks good. I set it up so that the incoming files copied and renamed to replace the copy that is set in the path the import macro is using. (new file but same name). On the first import I save the steps then created a macro for the end users so that they do not have to do the manual importing. That macro keeps popping errors and I was able to track down the cause but I don't understand it nor do I know how or even if there is a way to resolve it. If the new file is "saved" over the copy being imported the save import can not longer find the document even though it is in the same folder and has the same name. If the data is simply copied from the new file and pasted into the target file then the macro works fine.

    Why would saving over the existing file make the document unrecognizable and is there a way to fix it?



    Thanks

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    If the files are always going to the same location with the same file name why not try to renew the links, typically what I've done with this sort of things is not link the excel files at all, but import the contents via code using the docmd.transferspreadsheet commands. Are you using a linked table structure?

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Why would saving over the existing file make the document unrecognizable and is there a way to fix it?
    Could be a number of things. Maybe the new file name has had a space added...... would have to see the code.

  4. #4
    Xarkath is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Millcreek WA
    Posts
    92
    Hello,

    These are not linked tables. I did not want to go that direction. I have never use the "transferspreadsheet" commands; I will look into them. As for the name it should not be changing, typically I browse to the folder then click on the document which then assigns the name. I do it this way to avoid any typing errors.

    As for the code, not much to it, just a button that triggers a macro to run the saved import. All wizard created.

    It is almost as if the create date is part path so by doing a "save as" it gets a new create date and breaks the link stored in the saved import. Makes no sense to me but that is how it acts. And I have checked the saved import to be sure that there are not any dates in the path. If there is, they are hidden.

    Thanks for the suggestion, I'll look into it.

  5. #5
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,538
    Convert the macro to VBA (using the Access Wizard) and then post the VBA code to this forum for analysis.

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    I agree, convert the macro to vba then post the code.

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

Similar Threads

  1. Import Template Issue
    By kevin28 in forum Import/Export Data
    Replies: 3
    Last Post: 02-04-2015, 06:25 PM
  2. Really close to figuring out this import issue
    By nhylan in forum Programming
    Replies: 3
    Last Post: 04-23-2013, 11:31 AM
  3. Import issue with irregular text file
    By NewtoIT in forum Import/Export Data
    Replies: 3
    Last Post: 05-31-2012, 03:30 PM
  4. dBase import/link issue
    By SteveF in forum Import/Export Data
    Replies: 3
    Last Post: 04-16-2012, 05:19 PM
  5. XML File Import To Access...Overwrite Issue
    By wipers123 in forum Import/Export Data
    Replies: 0
    Last Post: 02-11-2010, 12:27 PM

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