John W. Colby
jwcolby at colbyconsulting.com
Thu Apr 1 19:08:27 CST 2004
Whoa, thanks for that. It never would have occurred to me to do that. I have a file spec with all the fields and their start / stop positions, as well as the format. I kinda figured I'd build a table that has all of that info plus my corresponding field name (it's a rather monstrous query since it pulls from about a dozen normalized tables). Then build a function that opens the recordset and builds each record based on their field spec table. In the end, what a PITA. But your suggestion will definitely make things easier. John W. Colby www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Stuart McLachlan Sent: Thursday, April 01, 2004 7:43 PM To: Access Developers discussion and problemsolving Subject: RE: [AccessD] Transfer text field name On 1 Apr 2004 at 19:12, John W. Colby wrote: > In the coming months I will have a similar problem to solve. My client > handles claim processing for disability insurance - the middle man / call > center role. Their client - the insurance company - is moving to new > software and I have to change to outputting just the fields that we already > export to them, perhaps 60 or 70 fields, into a single record of hundreds of > fields, formatted EXACTLY as they dictate, fixed field width. They can't > even handle delimited, it must be fixed width fields. Literally about 3000 > bytes per record with all the blank fields just spaces. > A suggestion based on bitter experience for when you get round to this. Don't try to build the output by concatenation of variable length strings, it quickly becomes a nightmare to keep track of where you are. Build the full string first with strOutputString = Space$(3000) Then insert your fields in the correct position with Mid$(strOutputString,lngFldPosn) = strFieldData -- 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