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!
It is your Import Specification the sets the text delimiter that separated
the file into fields. What did you set as the delimiter and what is the
delimiter in the file?
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" - Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
"Igor G." <Ig...@discussions.microsoft.com> wrote in message
news:0D3ADD59-C8D1-410B...@microsoft.com...
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.
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
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Igor G." <Ig...@discussions.microsoft.com> wrote in message
news:F38CBC1D-C839-4692...@microsoft.com...
>I was imported txis txt file manual without problems (just, next... next)
>but
> I must create macro for automating this proces with external software.
> Here is 11 regular columns. When i was pasted this sample look
> differently.
>
> "Jerry Whittle" wrote:
>
>> That data doesn't seem to be delimited. Try doing a manual import using
>> fixed
>> width and see if that works. You may need to manually insert the divider
>> lines between the fields especially near the 1 towards the right side of
>> the
>> record.
>>