printing to a fixed columnwidth text file

  • Thread starter Thread starter J
  • Start date Start date
J

J

Hi,

I need to create an ascii text file containing a header text, followed by
the contents of two fields (multiple records) from 3 or 4 tables in a
database. Looking at some other code the previous export macro/module used
the print character, but how can I set a fixed width for the first column.
The data is 5, 6 or 7 characters wide but the column MUST be 17 characters
wide before the next column starts. Any ideas...

Regards

Jonathan
 
J said:
I need to create an ascii text file containing a header text, followed by
the contents of two fields (multiple records) from 3 or 4 tables in a
database. Looking at some other code the previous export macro/module used
the print character, but how can I set a fixed width for the first column.
The data is 5, 6 or 7 characters wide but the column MUST be 17 characters
wide before the next column starts. Any ideas...


A report is not a viable mechanism to do that.

You should create a procedure to open a recordset on the
table/query and then use the File I/O statements to write
the data to the text file. See Open, Print, Put, FreeFile,
etc. in Help.
 
Back
Top