Consulting

Results 1 to 20 of 66

Thread: Importing multiple txt files, but including extra data from file name

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,297
    Location
    OK, I have had another look at your code, you have removed the Specification name from the docmd function, but you also removed the comma as well, which is a place holder for the specn. so the code is probably reading the file name as the specn.
    So try

    DoCmd.TransferText transferType:=acImportDelim, , TableName:="tblBarDailyData", FileName:=FilePathName, hasfieldnames:=True
    If that doesn't work take a copy of a file and remove any sensitive data and then upload it as a zipped file on to the forum using the Go Advanced and Manage Attachment buttons and I will see if I can open it.
    Last edited by Aussiebear; 04-11-2023 at 06:04 AM. Reason: Added code tags to supplied code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •