locked
Text Import unknown error on known good code (VBA) RRS feed

  • Question

  • Recently I have been encountering errors on import with text delimitated files (.txt) using saved MS Import Specification schemas.  There is no error description and the error number = 0.  The problem is intermittent, I am utilizing MS Access 2016 on a Win 10.3 Networked computer.  Suspect problem to be related to the network memory or processing?  Is there a recommended resolution that does not entail administrative privileges?  Any coding in VBA to help overcome the errors?  As indicated there is no problem in the VBA coding simple line:

    DoCmd.TransferText acImportDelim, "SchemaName", "TableName", TextFilePath, False

    Any assistance would be greatly appreciated!

    Wednesday, March 6, 2019 12:27 PM

All replies

  • Hi. Just to be clear, are you saying the same exact .txt file will fail sometimes but would work without any problems at other times? If you're saying the same code works for some .txt files but not for others, then I would check the .txt files first.
    Wednesday, March 6, 2019 4:58 PM
  • Yes the exact .txt file will import, I may have to step through the code a couple of times to force it to run.  Problem is intermittent mainly related to large files approximately 5Meg and greater.  
    Thursday, March 7, 2019 12:13 PM
  • No programmatic solution identified. Simply keep clicking the command button until it runs without error third time is usually the charm.  Just another networking issue to contend with.
    Monday, March 18, 2019 12:26 PM
  • Are you using a persistent connection?

    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Monday, March 18, 2019 1:07 PM