Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Location
    California
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Importing text file using a macro (Access 2000)

    I've created a macro to transfer a text file into an Access table. I have created the specifications for the fixed width fields. If I transfer the file manually, not running the macro, the complete file is transferred. However, when I include the transfer as part of the macro, the file specifications and file name and location are specified, the first record is deleted.

    I would sure appreciate any input.

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing text file using a macro (Access 2000)

    Look at the Has Field Names parameter. From Access Help:

    This specifies whether the first row of the text file contains the names of the fields. If you select Yes, Microsoft Access uses the names in this row as field names in the Microsoft Access table when you import or link the text data. If you select No, Microsoft Access treats the first row as a normal row of data. The default is No.
    If you are importing or linking a fixed-width text file and select Yes in this box, the first row containing the field names must use the field delimiter set in the import/export specification to separate the field names.

Posting Permissions

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