Microsoft KB Archive/824178

= Skipped fields are imported when you import data from a comma-delimited text file to an existing table =

Article ID: 824178

Article Last Modified on 4/12/2007

-

APPLIES TO


 * Microsoft Office Access 2003
 * Microsoft Access 2002 Standard Edition
 * Microsoft Access 2000 Standard Edition

-





SYMPTOMS
When you import data from a comma-delimited text file to an existing table by using the Import Text Wizard, the data in the fields that you have selected to skip in the Import Specification dialog box are imported to the existing table.



WORKAROUND
To work around this problem, perform one of the following tasks:

Save the Import Specification
 Open the database that has the problem that is mentioned in the &quot;Symptoms&quot; section of this article. On the File menu, point to Get External Data, and then click Import. In the Import dialog box, click Text Files in the Files of type list. Locate and then select the text file that you have to import, and then click Import. In the Import Text Wizard, click Next. Click to select First Row Contains Field Names, and then click Advanced. In the Import Specification dialog box, in the Field Information pane, click to select the check boxes under the Skip column for the fields that you do not want to import.</li> In the Import Specification dialog box, click Save As.</li> In the Save Import/Export Specification dialog box, click OK, and then click OK to exit the Import Specification dialog box.</li> In the Import Text Wizard, click Next.</li> Click to select the In an Existing Table check box, and then select the existing table where you want to import the data. Click Next, and then click Finish.</li> Click OK when you receive the following message:

Finished importing file  to table.

</li></ol>

Import Data to a New Table
<ol> Open the database that has the problem that is mentioned in the &quot;Symptoms&quot; section of this article.</li> On the File menu, point to Get External Data, and then click Import.</li> In the Import dialog box, click Text Files in the Files of type list.</li> Locate and then select the text file that you have to import, and then click Import.</li> In the Import Text Wizard, click Next.</li> Click to select the First Row Contains Field Names check box, and then click Advanced.</li> In the Import Specification dialog box, in the Field Information pane, click to select the check boxes under the Skip column for the fields that you do not want to import.</li> Click OK to exit the Import Specification dialog box.</li> In the Import Text Wizard, click Next.</li> Click In a New Table, and then click Next.</li> <li>In the Import Text Wizard, click Next with the default Field Name and Data Type that are given.</li> <li>In the Import Text Wizard, click Let Access add primary key, and then click Next.</li> <li>Click Finish to exit the Import Text Wizard.</li> <li>Click OK when you receive the following message:

Finished importing file  to table.

</li></ol>

<div class="moreinformation_section">

Steps to Reproduce the Behavior
<ol> <li>Start Microsoft Office Access, and then create a new database.</li> <li> In the new database, create a table that is named Employee, with the following columns: Column Name    Data type

-

EmplD          Text

Empname        Text </li> <li>Define a primary key on the EmpID field.</li> <li>Create a sample comma-delimited text file. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Run Notepad.</li> <li> Paste the following text in Notepad: EmpID,EmpName

111,John

222,Jim </li> <li>Save the file on drive C with the name Employee2.txt .</li></ol> </li> <li>In the Access database window, point to Get External Data on the File menu, and then click Import.</li> <li>In the Import dialog box, click Text Files in the Files of type list.</li> <li>Locate the text file Employee2.txt that you created in step 4, select the file, and then click Import.</li> <li>In the Import Text Wizard, click Next.</li> <li>Click to select the First Row Contains Field Names check box, and then click Advanced.</li> <li>In the Import Specification dialog box, under Field Information, click to select the check box under the Skip column against all the required fields except for EmpID.</li> <li>Click OK to exit the Import Specification dialog box.</li> <li>In the Import Text Wizard, click Next.</li> <li>Click to select In an Existing Table, and then select table Employee2.</li> <li>Click Next and then Finish.</li> <li>Click OK when you receive the following message:

Finished importing file C:\Employee2.txt to table Employee2.

</li> <li>Open the Employee2 table.

Note All the fields in the Employee2 table are populated, even when you have chosen to import only EmpID.</li></ol>

Additional query words: Acc2003 Acc2002 Acc2000

Keywords: kbexport kbwizard kbimport kbprb KB824178

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.