Results 1 to 3 of 3
  1. #1
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283

    Can't import file with having a period in the name

    Hello,

    I'm kinda confused why I can't import a file into my table when there is a period in the file name. I'm using the code:

    DoCmd.TransferText _


    TransferType:=acImportDelim, _
    SpecificationName:="Test", _
    TableName:="Test1", _
    FileName:=Test1.010101.txt, _
    HasFieldNames:=False

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Periods in file names (that do not precede the file extension) are problematic.
    You can rename the file in your VBA code before importing it to get around that issue.
    See: https://www.accessforums.net/import-...iod-31395.html

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    The file name should be in quotes too - "Test1.010101.txt"

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

Similar Threads

  1. Import CSV file
    By gg80 in forum Programming
    Replies: 8
    Last Post: 04-08-2014, 09:35 AM
  2. Replies: 1
    Last Post: 03-27-2014, 06:43 PM
  3. Import Excel file based on a date and time in file name
    By nhylan in forum Import/Export Data
    Replies: 4
    Last Post: 04-16-2013, 03:26 PM
  4. Access 2003: import of csv fails due to period in filename
    By vanthien in forum Import/Export Data
    Replies: 5
    Last Post: 01-12-2013, 07:03 PM
  5. Import a .sql file?
    By Alan in forum Import/Export Data
    Replies: 1
    Last Post: 06-03-2009, 07:52 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