Steps to Reproduce the Problem in Access 2002
Create the Comma Delimited Text File
To create the comma delimited text file, follow these steps:
- Start Notepad.
- Paste the following text in Notepad:
MasterPack,QCSN,FNCI,MyHex,ESN.
P1005C4J5,N108B08V4,FNCI21000000037,7402051F,11600132383
P1005C4J5,N108B08T5,FNCI21000000069,74020522,11600132386
- Save the file as
source.txt.
Import the Text File into the Access Database
To import the text file, follow these steps:
- Start Access.
- Create a new database.
- 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 section.
- Locate the Source.txt text file.
- Click the text file, and then click
Import.
- In the Import Text Wizard dialog box,
click Next. Click Next in the other
Import Text Wizard dialog boxes, and then click
Finish to exit the Import Text Wizard.
- Click OK in the message box.
- In the Database window, click
Tables.
- Right-click the source table, and then click Design View to
open the table in Design view.
- Click the row selector for the Field5 field, and verify the Field Size value in the
Field Properties pane.
You may see that the Field
Size is populated with the Long Integer
value. - Close the Design view window, and then double-click the source table to open the table in Datasheet view.
The data that corresponds to the Field5 column is not imported. - Close the table.
Use the TransferText Method
To use the
TransferText method, follow these steps:
- In the Database window, click Modules
in the Objects section.
- Click New.
- On the View
menu, click Immediate Window.
- Type the
following information, and then press Enter: DoCmd.TransferText acImportDelim, "Source_DataViaCode", "C:\Source.txt", True
- Close the Visual Basic Editor.
- In the Database window, click
Tables.
- Right-click the Source_DataViaCode table , and then click Design View to
open the table in Design view.
- Click the row selector for the ESN field , and then verify the Field Size value in the
Field Properties pane.
- Click the row selector for the MyHex field, and then verify the Field Size entry in the
Field Properties pane.
Note that the
ESN field is correctly mapped to the
Double data type,
but the
MyHex field is also incorrectly mapped to the
Double
data type.