MS Access - Format in Export

G

Guest

I have read several questions which appear to solve my problem but it still
won't work! I am exporting the results of a query to a fixed length .txt
file. I am using an export specification and have 2 formatted fields with
amounts in which I want exported right justified. So I have put in
Format([value]," 00.00;-00.00; 00.00"). When I run the export in the export
text wizard it shows in the right format, when I look in the resulting .txt
file it is back to left justified. What am I doing wrong?
 
R

Rick Brandt

Julie said:
I have read several questions which appear to solve my problem but it
still won't work! I am exporting the results of a query to a fixed
length .txt file. I am using an export specification and have 2
formatted fields with amounts in which I want exported right
justified. So I have put in Format([value]," 00.00;-00.00; 00.00").
When I run the export in the export text wizard it shows in the right
format, when I look in the resulting .txt file it is back to left
justified. What am I doing wrong?

The Format function you are using should make all of the output for that field
the same length (6 characters). When all of the data is the same length how can
it be left justified? Are you saying that the spaces aren't coming through?
 
G

Guest

I'll give you an example - the field in Access contains 3.5 I want the six
character field output as ' 3.50' but what I am getting is '3.5 '. Can you
help, please?

Rick Brandt said:
Julie said:
I have read several questions which appear to solve my problem but it
still won't work! I am exporting the results of a query to a fixed
length .txt file. I am using an export specification and have 2
formatted fields with amounts in which I want exported right
justified. So I have put in Format([value]," 00.00;-00.00; 00.00").
When I run the export in the export text wizard it shows in the right
format, when I look in the resulting .txt file it is back to left
justified. What am I doing wrong?

The Format function you are using should make all of the output for that field
the same length (6 characters). When all of the data is the same length how can
it be left justified? Are you saying that the spaces aren't coming through?
 
R

Rick Brandt

Julie said:
I'll give you an example - the field in Access contains 3.5 I want
the six character field output as ' 3.50' but what I am getting is
'3.5 '. Can you help, please?

I just tried it on a test table and it worked fine for me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top