Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007
    Posts
    22

    Unanswered: Import text to table

    Please help me, I need to transfer text file in info.txt to table test1. but I have still wrong.But for Transferring from table test to txt info.text successful.Now I need to transfer info.txt to test1 This the script :
    DoCmd.TransferText acImportDelim, , "info.txt", "E:\DATABASE\FTP\Download\FTP Download.mdb\test1"

  2. #2
    Join Date
    Apr 2007
    Posts
    22
    or I have other script:

    Dim strfile As String

    ChDir ("E:\DATABASE\FTP\Info.txt")
    strfile = Dir("Info.txt")
    Do While Len(strfile) > 0
    DoCmd.TransferText acImportDelim, "info", "test1", _
    "E:\DATABASE\FTP\Info.txt" & strfile, True
    'delete the file (consider moving it to an Archive folder instead.)
    Kill "E:\DATABASE\FTP\Info.txt" & strfile
    strfile = Dir
    Loop

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You're using incorrect syntax - use the helpfile for more information
    Code:
    DoCmd.TransferText acImportDelim, , "<TableName>", "<FileName>"
    George
    Home | Blog

Posting Permissions

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