Export the query in Pipe delimited .csv format (1 Viewer)

aman

Registered User.
Local time
Today, 05:35
Joined
Oct 16, 2008
Messages
1,250
Hi Guys

The following line of code exports the file in comma separated format but not sure what change needs to be made to export it in pipe delimited format. Any help will be much appreciated.

Code:
 With db.CreateQueryDef("QryTest", strsql) ' create a temporary query named QryTest
    
        DoCmd.TransferText acExportDelim, , "QryTest", FileName:=strFull, hasfieldnames:=False  'execute the transfer text

 End With

Thanks
 

Ranman256

Well-known member
Local time
Today, 08:35
Joined
Apr 9, 2015
Messages
4,337
All your specs should be stored in a Spec name.
set all your formats, delim, pipe, etc
manually import a file, set all these settings, save the spec name.
then

docmd.TransferText acExportDelim ,spec,query,file,true
 

aman

Registered User.
Local time
Today, 05:35
Joined
Oct 16, 2008
Messages
1,250
Hi Ranman, Can you please tell me the steps needs to be performed ? I have not idea how to start with.

Many Thanks
 

aman

Registered User.
Local time
Today, 05:35
Joined
Oct 16, 2008
Messages
1,250
Got it working. Thanks a lot.
 

Users who are viewing this thread

Top Bottom