ACC: "Field 'F1' Doesn't Exist in Destination Table" Error Msg

Last reviewed: May 7, 1997
Article ID: Q142186
The information in this article applies to:
  • Microsoft Access versions 7.0, 97

SYMPTOMS

Advanced: Requires expert coding, interoperability, and multiuser skills.

When you append data to an existing table from a delimited text file using a TransferText macro action or a TransferText method in Visual Basic for Applications, you may receive the following error message:

   Field 'F1' doesn't exist in destination table '<table>'.
   Microsoft Access was unable to append it.

   The destination table must contain the same fields as
   the table you are pasting from.

CAUSE

The first row of the text file does not contain field names; therefore, Microsoft Access assumes the fields are called "F1," "F2," and so on.

RESOLUTION

You can create and use an import specification to identify the fields in the delimited text file.

To create an import specification, follow these steps:

  1. In the Database window, select the table into which to append data using a TransferText macro action or a TransferText method in Visual Basic for Applications.

  2. On the File menu, click Get External Data, and then click Import.

  3. In the Import box, select Text Files (*.txt, *.csv, *.tab, *.asc). Locate and select your delimited text file, and then click Import.

  4. In the Import Text Wizard box, click Advanced.

  5. In the 'NameOfFile' Import Specification box, type the correct field names for the fields in the Field Name column, and then click Save As. Enter a specification name and click OK.

  6. Click OK to close the 'NameOfFile' Import Specification box.

  7. In the Import Text Wizard box, click Cancel.

To use the import specification, follow these steps:

  1. Open the macro or Visual Basic procedure containing the TransferText action or method in Design view.

  2. Modify the action or method to include a Specification Name argument. For example:

    In a Macro:

          TransferText Actions
    
             Transfer Type: Import Delimited
             Specification Name: <specification name>
             Table Name: <table name>
             File Name: <full path>
             Has Field Names: No
    
       In Visual Basic for Applications:
    
          DoCmd.TransferText acImportDelim,<specification name>, _
          <table name>, <filename path>, 0
    
    

REFERENCES

For more information about transferring text using a macro or Visual Basic for Applications, search on the phrase "transfertext," and then view "Automate importing, exporting, or linking of data" using the Office Assistant.


Keywords : IsmTxtd kberrmsg kbusage
Version : 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.