Exporting Data as text file

  • Thread starter Thread starter wasimsono via AccessMonster.com
  • Start date Start date
W

wasimsono via AccessMonster.com

Dear All

I want to export the data as text file but I want that only data should
trasfer and no spaces should transfer.Spaces in fileds ( e.g. the field
length is 8characte and the data is 456 then it should be as 00000456) should
be replaces with zeros. This output file is required for COBOL processing.

Remember that it should all be done just like for a new user. The user Oly
select or click any button for 'Export' or 'Backup' and the all workd done
behind the scene.

Any help regarding this is highly appreciated.


Thanks in advance.


Wasim
 
To have the spaces replaced with zeroes, write a query that uses the Format
function on the numeric fields (not the Format property), and work with that
query rather than the table.

You should be able to use the TransferText method, but if that doesn't give
you a satisfactory result, you can always use the VBA Print # statement (in
conjunction with the Open and Close statements)

If you want to give your users the ability to choose where the file should
be put, consider using http://www.mvps.org/access/api/api0001.htm at "The
Access Web" rather than any other approach.
 
Back
Top