dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Importing a text file using VBA in Access 2000

  1. #1
    Gill Guest

    Importing a text file using VBA in Access 2000


    Hi,
    I need to import a text file using VBA in Access 2000.
    I want the text file to be imported into a table when the user opens a form.


    Has anyone any suggestions of how to go about this??

    Thanks in advance for any help.

    Gill

  2. #2
    Roy Guest

    Re: Importing a text file using VBA in Access 2000

    1. If you need to import a single file then do it manually by going to File
    > Get External Data > Import, select Text file type, point to your file and

    follow instructions on "Import Text Wizard" dialog.
    2. If you are planning to do this task multiple times then follow step 1 and
    when you see "Import Text Wizard" dialog click "Advanced..." button, follow
    instruction, give your new Specification a name and save it.
    3. Your call to that spec may look something like this:
    DoCmd.TransferText acImportFixed, "Summary_Spec", SourceTableName,
    SourceFile

    If it is not clear I may suggest you read help on TransferText method.

    Regards,
    Roy

    "Gill" <Maloneygillian@hotmail.com> wrote in message
    news:3bab426b@news.devx.com...
    >
    > Hi,
    > I need to import a text file using VBA in Access 2000.
    > I want the text file to be imported into a table when the user opens a

    form.
    >
    >
    > Has anyone any suggestions of how to go about this??
    >
    > Thanks in advance for any help.
    >
    > Gill




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center