Igor G. said:
Here is example, three rows in 11 columns...
Thanks!
ALM 07:49:55 21PC1 PVHI 9.400 HIGH VRH V-4B
T2 9.402 21
ACK 07:50:40 21PC1 PVHI HIGH VRH V-4B
T2 1 31
RTN 07:50:56 21PC1 PVHI 9.400 HIGH VRH V-4B
T2 9.199 21
"Jerry Whittle" wrote:
> Please show us an example of the data in the txt/csv file and also what you
> want it to look like in the table.
>
> Let's take a look at the acImportDelim argument. Are the fields in the table
> delimited by commas, tabs, or something else?
>
> If this is something that you need to do often, you may need to create an
> import specification especially if there is a non-standard delimiter such as
> the pipe | character. Do a manual import and look for an Advanced button in
> the dialog boxes. Figure out things there and save the import spec.
>
> By the looks of your code, Import is the name of your import spec. Is that
> true? If so I believe that it needs to be in double quotes to work.
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
> "Igor G." wrote:
>
> > I have problem with importing txt/csv files with 11 columns data inside.
> > When is data imported, there is just one column.
> > Here is my code:
> > --------------------
> > Dim strPath As String
> > Dim strFile As String
> >
> > strPath = "C:\Tmp\"
> > strFile = Dir$(strPath & "Alarm.txt")
> >
> > DoCmd.TransferText acImportDelim, Import, "Alarm", strPath & strFile,
> > False
> > --------------------
> >
> > How enter txt file to access table in 11 columns?
> > Thanks!