Results 1 to 6 of 6
  1. #1
    steve2507 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    12

    Importing A Text File

    Hi,

    I'm trying to import a text file (semicolon delimited) into a table using the following code:
    Code:
    DoCmd.TransferText acImportDelim, , "tmp-orders", "url", True
    However I get the error message
    The file does not exist, or you do not have read access to the file
    The file is on a website and is there (I can view it in a browser).



    Does anyone have any ideas?

    Thanks

    Steve

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    url is a variable set in code? Don't put variables within quote marks.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    steve2507 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    12
    Just found out that Access can't take the text file from a website so have managed to get it working by manually downloading the file.

    Now on the lookout for a way to automatically download the file in question.

  4. #4
    steve2507 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    12
    Sorry June7, thank you for the reply.

    The url is a variable but isn't in quotes in the sub, I added the quotes to make it show that I knew the actual filename had to be in quotes.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    steve2507 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    12
    Quote Originally Posted by June7 View Post
    Thanks for the heads up.

    I also found this http://www.access-programmers.co.uk/...d.php?t=150077

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

Similar Threads

  1. Importing a text file
    By Kurs in forum Access
    Replies: 11
    Last Post: 02-20-2012, 02:26 PM
  2. Error 3027 when importing text file
    By tym in forum Access
    Replies: 4
    Last Post: 12-12-2011, 12:53 PM
  3. Importing a text file to access
    By Navop in forum Access
    Replies: 2
    Last Post: 11-11-2010, 07:15 PM
  4. Replies: 1
    Last Post: 11-05-2010, 04:31 PM
  5. Importing text file into Access Table
    By Anthony in forum Import/Export Data
    Replies: 13
    Last Post: 09-23-2009, 04:47 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