VBA Formatting an exported file

BenJones

BenJones
Local time
Today, 21:42
Joined
May 19, 2004
Messages
10
I have a database with a table I wish to export as a txt. This file will then be uploaded to a mainframe system. In order for the mainframe upload to work I must get the table fields formatting exactly right (for instance, a number of fields must start with 2 zeros and always be right aligned).

I don't want to format at table design level but would like to know if anyone can advise how to format fields in VBA.

This is quite a big project I'm working on and any help/advice would be greatly appreciated.

Cheers
:cool:
 
Create a query and set the format you need for each field within the query. Then export [the TransferText or TransferSpreadsheet method will work] that query to the file type you need. Alignment will not matter in an export file.

You will have to use the Format() function not the 'property' to get the results you want.
 

Users who are viewing this thread

Back
Top Bottom