Microsoft KB Archive/160501

= ACC: TransferText Cannot Import Data into an Enabled Microsoft Access 2.0 Database =

Article ID: 160501

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q160501



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



SYMPTOMS
When you use TransferText in a macro or in a Visual Basic procedure to import data into an enabled Microsoft Access 2.0 database in Microsoft Access 7.0 or 97, you receive may the message:

  You can't import objects into a database created in an earlier version of Microsoft Access.

This problem does not occur if you use TransferText to import data into an enabled Microsoft Access 7.0 database in Microsoft Access 97.



RESOLUTION
You can work around this error message in two ways:


 * Use Microsoft Access 2.0 to import the data into the database.
 * Convert the Microsoft Access 2.0 database to the version of Microsoft Access you are using.



STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 7.0 and 97.



Steps to Reproduce Behavior
  Using Notepad or another text editor, create the following new text file and save it as C:\My Documents\Customer.txt.

     "ALFKI","Alfreds Futterkiste" "ANATR","Ana Trujillo Emparedados y helados" "ANTON","Antonio Moreno Taquerias"  Start Microsoft Access 2.0 and create a new database called Transfer.mdb.  Create the following new table in Design view:

     Table: Customers ---     Field Name: CustomerID Data Type: Text Field Size: 5 Indexed: Yes (No Duplicates) Field Name: CompanyName Data Type: Text Field Size: 255 Table Properties: Customers ---        PrimaryKey: CustomerID  Save and close the Customers table.</li> On the File menu, click Imp/Exp Setup.</li> Without modifying the default values in the Import/Export Setup dialog box, click the Save As button and save the specification as Cust. Click OK to close the dialog box.</li>  Create the following new macro called ImportCustomers:

<pre class="fixed_text">     Macro: ImportCustomers        Action ---                                   TransferText

ImportCustomers Actions ---     TransferText Transfer Type: Import Delimited Specification Name: Cust Table Name: Customers File Name: C:\My Documents\Customer.txt Has Field Names: No                       </li> Save the macro, and then run it.</li> Open the Customers table in Datasheet view and verify that it contains the three records from the text file you created in step 1.</li> Delete all three records from the table.</li> Close the table, and then quit Microsoft Access.</li> Start Microsoft Access 7.0 or 97, and open the Transfer.mdb database.</li> In the Convert/Open Database dialog box, click Open Database. Click OK when you see the message that you can't make changes to the database objects.</li> Click the Macros tab in the Database window and run the ImportCustomers macro. Note that the macro fails, and you receive the error message:

You can't import objects into a database created in an earlier version of Microsoft Access.

</li></ol>

<div class="references_section">