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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.TransferText acExportDelim Delimiter Change

Status
Not open for further replies.

quincyman

Programmer
Sep 20, 2002
2
US
I am using the code
DoCmd.TransferText acExportDelim, "", "PromoID", "C:\Temp\promo.txt"
and the delimiter is a comma in the text file. I wish to change the delimiter to a pipe "|". The command does not have a variable for setting the delimiter. Does anyone know of how to do this?

Thanks in advance.

Q
 
Create a Export specification. You can specify the delimiter you want to use there. Replace the first empty parameter in you command with the specification name:

DoCmd.TransferText acExportDelim, "MySpecFile", "PromoID", "C:\Temp\promo.txt"
 
Thanks. I will do that...can you point me in the right direction to create or give me an example of that file?

Thanks.

Rick
 
The following are the steps in Access97. I don't know the process for Access2K and above.
On the database window hilight the table or query to export.
Select File>Save As/Export>To an External File or Database>
Select the file type as .txt>Click Export>Click Advanced
Enter the "|" character in Delimiter. Click Save As
Give the Specification a meaningful name. Click Ok>Click Ok
Click Next>Click Next>Click Finish.
The file will export, and the spec will be saved.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top