• Import Text, Add Record Number (Access 97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Import Text, Add Record Number (Access 97)

    Author
    Topic
    #406805

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #846223

      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.

    • #846224

      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.

    Viewing 1 reply thread
    Reply To: Import Text, Add Record Number (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: