export data with outputTo

bobbybeers

Registered User.
Local time
Today, 04:47
Joined
Mar 14, 2013
Messages
17
Hello all,
I am trying to export the data from a form to a textfile by using the following simple piece of code:

Private Sub Command188_Click()
DoCmd.OutputTo acOutputForm, "CC_MAIN_PROJ"
End Sub

it works, but gives me the data like this:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SPEC | SIZE_1 | SIZE_2 | C1_s | C2_s | APS1 | APS2 | BPS1 |

what I really want is for the data to be without all the bars "|" and dashes etc. and even without headers. I just want a straight text output, maybe delineated by spaces or commas only.

Can anyone recommend something??
 
Hello -

Instead of using OutputTo, try using TransferText. I think I was having this problem a while back and resolved it with the TransferText method.

expression.TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage)
 

Users who are viewing this thread

Back
Top Bottom