ACC95: Exporting Query with Text Export Wizard Reorders Columns (163765)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
This article was previously published under Q163765 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you use the Text Export Wizard to create a delimited text file from a
query that contains an expression, the order of the columns in the text
file is different than it is in the query.
NOTE: This behavior also occurs when using the Text Import Wizard.
RESOLUTION
If you want to retain the same column order in the exported text file, you
can create a table from the query, and then export the table.
Or, you can use the TransferText action or method in a macro or Visual
Basic for Applications code.
Method 1: Exporting a Table Created from the Query- Create the query that you want to export to a text file.
- On the Query menu, click Make Table.
- In the Make Table dialog box, type the name of a new table to store the
results of the query.
- On the Query menu, click Run. Confirm that you want to paste the rows
into a new table.
- Close the query, and then select the new table in the Database window.
- On the File menu, click Save As/Export to start the Text Export Wizard
and save the table to a delimited text file.
Method 2: Using the TransferText Action or Method
The following steps use the TransferText action in a macro; the same
results apply if you use the TransferText method of the DoCmd object in
Visual Basic code.
- Create the query that you want to export to a text file.
- Create a new macro that contains the TransferText action to export the
query to a delimited text file.
- Run the macro to export the query.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This
problem no longer occurs in Microsoft Access 97.
REFERENCES
For more information about the TransferText method or macro action, search
the Help Index for "TransferText action" or "TransferText method."
For more information about exporting text files, search the Help Index for
"exporting data."
Modification Type: | Major | Last Reviewed: | 11/17/2000 |
---|
Keywords: | kbbug kbusage KB163765 |
---|
|