Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 283048 - Last Review: August 11, 2004 - Revision: 1.0
You cannot export part of a table to a text file in Access 2002
This article was previously published under Q283048
For a Microsoft Access 2000 version of this article,
see
208544Â
(http://kbalertz.com/Feedback.aspx?kbNumber=208544/EN-US/
)
.
Novice: Requires knowledge of the user interface on single-user
computers.
This article applies to a Microsoft Access database (.mdb) and to a
Microsoft Access project (.adp).
When you try to omit fields from an export specification in
the Export Text Wizard, 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 that was created in an earlier 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>'
Microsoft Access does not allow you to customize the export
specification to omit specific fields from a table or a query.
Create a query that includes only the fields that you want
to export to the fixed-width or delimited text file. You can then run the
Export Text Wizard to export the query and create an Import/Export
specification with only the query fields. You can also run a TransferText
action to export the query using the Import/Export specification that was
created with an earlier version of Microsoft Access.
Microsoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
In an Access project, the
Save As button appears dimmed on the
Export Specification dialog box. This is because import/export specifications are
saved in the MSysIMEXSpecs and MSysIMEXColumns Microsoft Jet tables. Because
Jet is not loaded in an Access project, these tables are not available for
storage of the specifications.
However, in the following example, you
receive the same error in an Access project if you click
OK in the
Orders Export Specification dialog box after you delete the field from the list.
Steps to Reproduce the Problem
- Open the sample database Northwind.mdb.
- Click the Orders table in the Database window, and then
click Export on the File menu.
- In the Export Table 'Orders' To box, type Orders in the File name. Click
Text files in the Save as type box, and then
click Export.
- In the Export Text Wizard, click Fixed-Width, and then click Advanced.
- In the Orders Export Specification dialog box, click the EmployeeID row, and then press DELETE.
- In the Orders Export Specification dialog 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.
For more information about exporting
data using a fixed-width format, click
Microsoft Access Help on the
Help menu, type
automate linking data in the
Office Assistant or the Answer Wizard, and then click
Search to view the topics returned.
APPLIES TO
- Microsoft Access 2002 Standard Edition
| kberrmsg kbtshoot kbbug kbexport kb3rdparty kbpending KB283048 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate