[AccessD] Transfer text field name

Doug Murphy dw-murphy at cox.net
Thu Apr 1 16:31:57 CST 2004


Stuart,

Thanks for the code.  When I originally looked at this that was the
approach I was going to take, but then to save time (ha!) I decided to
use transfertext.  Lesson learned.

Thanks again.

Doug






-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart
McLachlan
Sent: Thursday, April 01, 2004 2:14 PM
To: Access Developers discussion and problemsolving
Subject: RE: [AccessD] Transfer text field name 


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.



-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list