Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to a delimited text file

Status
Not open for further replies.

rmchung

Programmer
May 30, 2001
17
US
How do I programmatically create a link to a delimited text file using a defined file schema?
 

Is this what you mean?

DoCmd.TransferText SpecificationName:=strImportSpecification, _
TableName:=strTableName, FileName:=strSourceFile


Stew
 
Stew,

The coding you have is if I wanted to import a text file into Access. Instead I just want to create a linked table. It's easy to do using the wizard - File, Get External Data, Linked Tables, select my text file, and tada, I have a link to my text file. I want to do what the wizard does, but in code. Hopefully that makes it clearer. Thanks for the input though.

Rye
 


Rye

Details.

Try adding - never tried it but look like it could work.

TransferType: acLinkDelim


Stew
 
thanks stew, it worked. Funny how I use that transfertext method quite a bit, but never knew it had the acLinkDelim. I guess I just overlook it all the time. Thanks again!!!

Rye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top