Microsoft KB Archive/225987

= ACC2000: Exporting to Word Merge Format After Renaming Field Causes Error =

Article ID: 225987

Article Last Modified on 6/30/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q225987





Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you export a table from a Microsoft Access database to the Microsoft Word Merge format, you may receive the following error message:

The data being exported does not match the format described in the Schema.ini file.

This error message includes the following text when you are using Visual Basic for Applications code:

Run-time error '3438':

When you export a table from a Microsoft Access project or a query from a Microsoft Access database to the Microsoft Word Merge format, you may receive the following error message:

The Microsoft Jet database engine could not find the object ' '. Make sure the object exists and that you spell its name and the path name correctly.

This error message includes the following text when you are using Visual Basic for Applications code:

Run-time error '3011':



CAUSE
The field names for the Microsoft Word Merge format are stored in the Schema.ini file the first time that you export the table or query. After a field name in the source table or query is modified, the previously exported fields no longer match the names of the new fields. The next time that you try to export the table or query, you receive one of the errors listed in the "Symptoms" section.



RESOLUTION
Use one of the following methods to correct this problem.

Method 1
Open the Schema.ini file with a text editor such as Notepad, and then delete the section that you are having trouble with. The section starts with the name of the text file in brackets. For example, if you export the Shippers table, the section would start on the line that has [Shippers.txt]. The section ends on the last line above the beginning of the next section.

Method 2
Open the Schema.ini file with a text editor such as Notepad, and then correct the field names that you are having trouble with. For example, if you export the Shippers table and later change the CompanyName field to CName, you would change the line that read

Col2=CompanyName Char Width 40

to read as follows:

Col2=CName Char Width 40

Method 3
Delete the Schema.ini file, and then export the table or query.



STATUS
Microsoft has confirmed that this is a problem in Microsoft Access 2000.



MORE INFORMATION
You may receive one of these errors if you export the table or query by using the Export command on the File menu, by using a macro that uses the TransferText action where the Transfer Type is Export Word for Windows Merge, or by using Visual Basic for Applications code that uses the TransferText method where the TransferType is acExportMerge.

You cannot export a view or stored procedure from an Access project to the Microsoft Word Merge format.

Steps to Reproduce Problem
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.


 * 1) Open the sample database, Northwind.mdb.
 * 2) Select the Shippers table. On the File menu, click Export.
 * 3) In the Export Table 'Shippers' As dialog box, in the Save as type list, click Microsoft Word Merge, and then click Save.
 * 4) Open the Shippers table in Design view.
 * 5) Change the name of the CompanyName field to CName.
 * 6) Save the change and close the Shippers table.
 * 7) Select the Shippers table. On the File menu, click Export.
 * 8) In the Export Table 'Shippers' As dialog box, in the Save as type list, click Microsoft Word Merge, and then click Save.

