Stuart McLachlan
stuart at lexacorp.com.pg
Thu Apr 1 16:14:29 CST 2004
On 1 Apr 2004 at 14:03, Doug Murphy wrote: > John, > > If it was in my control it wouldn't be there. Unfortunately this file > is imported into another commercial program that uses that field name. > All I am doing is converting the data from one format to another for the > import. The idea was to use a query and a couple of formating functions > to reformat some data from a file downloaded from the web and format it > for input into the program. This was supposed to be a quick project; I > get burned every time I think that way. > I avoid the TransferText becuase of these sorts of problems. It's quite simple to role your own and have complete control over what you are doing. Here's a very basic outline for a job specific export. You can automate a lot of this by passing parameters, looping thourhg fields etc Function ExportText() as Long Dim rs as Recodset Set rs = CurrentDb.OPenrecordset((qryMyQuery") Open "MyExportFile" for Output as #1 Print #1,"Street #,Second Field Name,Field with & in it,Etc" While not eof(1) Print #1, rs(0) & ",'" & rs(1) & "','" & rs(2) & "'," & rs(3) Wend Close #1 End Function -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support.