ACC: Can't Export Part of a Table to a Text File

Last reviewed: October 24, 1997
Article ID: Q145656
The information in this article applies to:
  • Microsoft Access versions 7.0, 97

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you try to omit fields from the export specification in the Export Text Wizard (or Text Export Wizard in Microsoft Access 7.0), you may receive the following error message:

   The number of fields in your export specification does not match the
   number in the table you have chosen to export.

Or, if you convert a database (created in a previous version of Microsoft Access) that uses a TransferText action with a fixed-width export specification to output only part of a table, you may receive the following error message when you run the TransferText action:

   INSERT INTO statement contains unknown field name '<field name>'

CAUSE

Microsoft Access 7.0 and 97 do not allow you to customize the export specification to omit specific fields from a table (or query). This behavior differs from earlier versions of Microsoft Access.

RESOLUTION

You can create a query that includes only the fields that you want to export to the fixed-width or delimited text file. Then, you can run the Export Text Wizard to export the query and create an Import/Export specification with only the query fields. Or, you can run a TransferText action to export the query using the Import/Export specification created with an earlier version of Microsoft Access.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 7.0 and 97. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

  1. Open the sample database Northwind.mdb.

  2. In the Database window, click the Tables tab and select the Orders table.

  3. On the File menu, click Save As/Export.

  4. In the Save As box, select "To an External File or Database", and then click OK.

  5. In the Save Table 'Orders' As box, click Text files (*.txt, *.csv, *.tab, *.asc) in the Save As Type box, and then click Export.

  6. In the Export Text Wizard, click the Fixed-Width button.

  7. Click the Advanced button.

  8. In the Orders Export Specification box, select the EmployeeID row and press DELETE.

  9. In the "You are about to delete 1 record(s)" box, click Yes.

  10. In the Orders Export Specification box, click Save As. Note that you receive the following error message:

    The number of fields in your export specification does not match the number in the table you have chosen to export.

REFERENCES

For more information about exporting data using a fixed-width format, type "TransferText" in the Office Assistant, click Search, and then click to view "Automate importing, exporting, or linking of data."

Keywords          : IsmSetup kb3rdparty kberrmsg
Version           : 7.0 97
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbbug
Solution Type     : kbworkaround


================================================================================


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: October 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.