Results 1 to 5 of 5
  1. #1
    gquery is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2018
    Posts
    20

    Import Error

    Upon import of a .txt file into an temporary access table, I recently have started to encountered an error. Whenever I run the saved import I receive these two message boxes.

    Click image for larger version. 

Name:	Error.PNG 
Views:	13 
Size:	7.9 KB 
ID:	35523
    Click image for larger version. 

Name:	Error2.PNG 
Views:	13 
Size:	5.5 KB 
ID:	35522

    I have checked to make sure that the file that I am importing has unique data, and is in the same format as the initial file used to set up the import, and it is.

    It is really odd because after I receive these messages, you would think that it would end the import, but instead it completes the import and the table appears with no issues, and no missing data. This would not be such a big deal if it did not throw an error with the macro that I have set up. Has anyone ever encountered an issue like this?

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    I have checked to make sure that the file that I am importing has unique data
    This to me implys the data in the txt file is all unique, but you check the file you're importing doesn't have duplicate data already in your TABLE from previous imports?

    it completes the import and the table appears with no issues, and no missing data
    Sounds like it's just skipping the rows already in your table and only importing the new data as one would expect.

  3. #3
    gquery is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2018
    Posts
    20
    The problem is that the import creates a table called 'TRN' in access. This table is a temporary table which is later deleted using VBA. It is essentially a brand new table with each import of data, so how exactly could it create duplicate values? The bizarre part is that I checked the row count in the txt file with the row count in the TRN table (it produces the table after clicking OK on both msgboxs) and all of the data is successfully imported, so how could I be getting these error messages?

  4. #4
    gquery is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2018
    Posts
    20
    I decided to use a work around. For anyone else that is having this issue and you use VBA to automate the process, place an error handler before and after you call the import. Again this is a workaround, and in the future if you do have an actual issue, this may not be the best thing to use.

    Example:
    On Error Resume Next
    DoCmd.RunSavedImportExport "Import-TRN"
    On Error GoTo 0

  5. #5
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Can you upload your db and text file?

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

Similar Threads

  1. Error when trying to import table
    By Gary Childress in forum Import/Export Data
    Replies: 5
    Last Post: 05-29-2014, 12:45 PM
  2. Import not working - no error
    By stlbryson in forum Import/Export Data
    Replies: 10
    Last Post: 07-04-2011, 02:02 PM
  3. Excel import error
    By limez0r in forum Programming
    Replies: 1
    Last Post: 11-15-2010, 08:12 PM
  4. 3127 error in FTP import
    By bmalex1 in forum Import/Export Data
    Replies: 1
    Last Post: 04-17-2010, 07:38 PM
  5. IMPORT ERROR ..PLEASE HELP
    By fadone in forum Import/Export Data
    Replies: 2
    Last Post: 04-20-2006, 06:36 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