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

ID: Q225987


The information in this article applies to:

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

This article applies to a Microsoft Access database (.mdb) and 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 'filename'. 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 this to be 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: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform 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.



REFERENCES

For more information about Microsoft Word Merge format files, click Microsoft Access Help on the Help menu, type "export a table or query to a Microsoft Word mail merge data source file" in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Additional query words: pra word merge schema ini fields runtime run time


Keywords          : kberrmsg kbdta IntpOlea 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: July 9, 1999