Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Sep 2003
    Louisville, Kentucky, USA
    Thanked 0 Times in 0 Posts

    Import Text, Add Record Number (Access 97)

    I'm importing a fixed text file into Access using this VBA command:

    DoCmd.TransferText acImportFixed

    It works great but the text file has date fields that are not always populated. Since my Import Specification has the fields defined as dates, I get import errors. Access creates its separate table of Import Errors which has fields of Error, Field, and Row. I would like to add Row Number to my imported data so that I can join my data table to the Import Errors table and do some exception reporting. There must be an easy way to do this but I haven't been able to find it by searching online help or this forum.

    Thanks for reading this.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Import Text, Add Record Number (Access 97)

    You can add an AutoNumber field to the imported table.

    Or import all fields as text, then use code or a query to process the records and copy them to another table with the correct field types.

Posting Permissions

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