Results 1 to 5 of 5
  1. #1
    Louie is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    1

    How to import a .dta file into Access 2010?

    We have hundreds of .dta files (data files in text format) that we would like to import into Access. If we first change the file extension to .txt, Access can import it just fine. However, we do not want to change the file extension on these.

    Is there a way to let Access realize that these .dta files are .txt files, and have it treat them as such?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Shall we assume you attempted import of .dta file with the Access import wizard and it failed? If so, then I expect the only alternative is VBA code. This might involve temporarily renaming the file to a txt extension and then changing back after the import completed.
    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
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by Louie View Post
    We have hundreds of .dta files (data files in text format) that we would like to import into Access. If we first change the file extension to .txt, Access can import it just fine. However, we do not want to change the file extension on these.
    Another option is to loop the files that you want to import, copy them and rename them for every iteration. It's very unlikely it will corrupt anything (file becomes unstable), even though windows apparently always thinks so.

    That would be one way to get around your problem. Actually, if you write this in VBA to also import the renamed files into Access for every iteration, the procedure will probably take less than 50 lines to write, if even half that.

  4. #4
    sampatrik is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    8
    i am not sure that there is any way to that things which Louie is asking for....

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by sampatrik View Post
    i am not sure that there is any way to that things which Louie is asking for....
    See the 2 posts before yours, bud.

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

Similar Threads

  1. Access 2010 Executable file
    By Desstro in forum Access
    Replies: 1
    Last Post: 01-22-2014, 03:59 PM
  2. import excel file to access 2003 yes, access 2007 no
    By stapik in forum Import/Export Data
    Replies: 9
    Last Post: 07-27-2011, 07:09 AM
  3. Importing large txt file into Access 2010
    By Jimbo in forum Import/Export Data
    Replies: 6
    Last Post: 06-30-2011, 08:26 PM
  4. Access 2010 Import Spreadsheet Wizard
    By frdebelo in forum Access
    Replies: 1
    Last Post: 06-20-2011, 12:11 PM
  5. Opening Access 2000 file in Access 2010
    By Jacob in forum Access
    Replies: 10
    Last Post: 02-12-2011, 06:56 AM

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