469,326 Members | 1,544 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,326 developers. It's quick & easy.

DoCmd.TransferText acImportDelim



I'm trying to import a tab delimited text file.

The text file does not have column heading. I can give it column
heading if needed. How do I change the defult comma delimited to tab?

If I need a specification file, what does one look like or how can I
create a specification file.

I have over 400 tables I need to import into the corresponding table in
access. The tables in access all ready exist with proper column
headings.

Thanks,
Teresa.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
4 41741
Right-click on the Tables in the object browser and select import. At the
bottom change the file type to text. Locate your file and click import.
Here you can further define you import criteria. Click the advanced tab at
the bottom. Here you can save the Specification. Click Save As and give it
a meaningful name. This is the name you will use in the code below to
import the file

DoCmd.TransferText acImportDelim, "ImportSpecName",
"NameofTableToImportTo", C:\YourFileName.txt, False

Hope it helps!
--
Reggie

www.smittysinet.com
----------
"Teresa" <ju****@cox.net> wrote in message
news:40*********************@news.frii.net...


I'm trying to import a tab delimited text file.

The text file does not have column heading. I can give it column
heading if needed. How do I change the defult comma delimited to tab?

If I need a specification file, what does one look like or how can I
create a specification file.

I have over 400 tables I need to import into the corresponding table in
access. The tables in access all ready exist with proper column
headings.

Thanks,
Teresa.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #2


I have over 400 tables to create a spec file. I've created spec files
using the menu options for importing files as you discribed. I was
hoping there was a way to create or import this file via code.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Sorry! Thought you were asking how to create an Import Spec. I don't know
how to change the default. Maybe someone else can help. Good luck!

--
Reggie

www.smittysinet.com
----------
"Teresa" <ju****@cox.net> wrote in message
news:40*********************@news.frii.net...


I have over 400 tables to create a spec file. I've created spec files
using the menu options for importing files as you discribed. I was
hoping there was a way to create or import this file via code.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4
Teresa wrote:

I'm trying to import a tab delimited text file.

The text file does not have column heading. I can give it column
heading if needed. How do I change the defult comma delimited to tab?

If I need a specification file, what does one look like or how can I
create a specification file.

I have over 400 tables I need to import into the corresponding table in
access. The tables in access all ready exist with proper column
headings.

Thanks,
Teresa.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Might i suggest that if you are going to import 400 text files into a
single access table, that you join the text files into a single text
file before you import it into Access.

You can do this with a simple batch file:

REM join.bat
REM Concatenate text files -
for %%f in (*.txt) do type %%f >> output_file.txt

then you only need one import into access.

Cheers
Chris
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by zhoujie | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.