Importing text files into length specify parameters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have forgotten how to import a string and tell how many character to
insert from the begging of the line into a specify column.

I think the code looks like this "INSERT INTO TableName (Field1(char 5),
Field 2(char 10))
"FROM TextFile"
 
N.Ordiers said:
I have forgotten how to import a string and tell how many character to
insert from the begging of the line into a specify column.

I think the code looks like this "INSERT INTO TableName (Field1(char 5),
Field 2(char 10))
"FROM TextFile"


Check the Mid function in Help to see if that's what you
want.
 
Thanks, but the file is outside of MS Access. I need to copy expecific number
of characters from each lines into defined fields in a MS Access table. I
have try using a schema.in but iti does not work for me. If you have any
idea of how I can accomplish the task, I will welcome it
 
If you can use File - Import (probably using the Advanced
features) to get the part of the text file containing the
characters you want into a field in some table, then we can
go from there.

If you can not use File - Import, then you will have to use
a sophisticated code procedure that intelligently parses the
text file to locate and extract the desired characters.
There's a class module that can be a big help at
http://www.mvps.org/access/modules/mdl0057.htm
but you will need to have expert coding skills if you can
not use File Import.
 
Back
Top