From: iccsi on
I would like to import a text file in to my table.
Is it possible to use append query?
If yes, how can I specify the field name in to my table?
If not, are there any solution for this?


Your information is great appreciated,


From: Mike Painter on
iccsi wrote:
> I would like to import a text file in to my table.
> Is it possible to use append query?
> If yes, how can I specify the field name in to my table?
> If not, are there any solution for this?
>
Since there are variations in the method an location of the import utility
as well as a couple ways to do it, I would suggest you push the F1 key and
look it up in help.
You will find a lot of information on the subject.

The above assumes that you have a text file of either fixed or delimited
fields and a delimitor for the end of the record.
Name. Address, phone, DOB <CRLF> is an example of an easy one.
Name<CRLF>
Address<CRLF>
phone<CRLF>
DOB <CRLF>
<CRLF>
Name<CRLF>
Address<CRLF>
phone<CRLF>
DOB <CRLF>
is harder and the solution depends on whether this is a one time import or
not.


From: John W. Vinson on
On Fri, 14 May 2010 09:59:12 -0700 (PDT), iccsi <inungh(a)gmail.com> wrote:

>I would like to import a text file in to my table.
>Is it possible to use append query?
>If yes, how can I specify the field name in to my table?
>If not, are there any solution for this?
>
>
>Your information is great appreciated,
>

Sure, if the text file is in a form that Access can read.

I'd suggest using File... Get External Data... Link or (equivalent) VBA code
using TransferText to link to the file. You will then have a linked "table",
and you can base an Append query on it to load data into your local table. As
with any Append query you can append from one fieldname into another:

INSERT INTO tblPeople (FirstName, LastName, MiddleName, Title, Address, City,
State, Postcode)
SELECT Field1, Field2, Field3, Field4, Field5, Field6, Field7, Field8
FROM linkedtextfile;

--

John W. Vinson [MVP]
 | 
Pages: 1
Prev: Email problem
Next: Combobox custom forecolor