By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 2,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

DoCmd.TransferText acImportDelim

P: n/a


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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a


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

P: n/a
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

P: n/a
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.