Number formatting in export

T

TRob

I have two fields that I would like to store as currency
in the table. The two fields are added together and
exported to a txt file via a query. The problem is, this
calculated field must be exported as a fixed number;
decimals allowed, but no commas and no dollar sign.

I have tried:
-setting the format property of the calculated field in
the query to fixed
-setting the format property of the calculated field in
the query to #.00
-setting the calculated field to
calculatedfield: Format(([Field1]+[Field2]),"#.00")

When I run the query in Access, the field appears correct
(ie. 361795.20) when I try each of the options above. But
the resulting txt file still shows the dollar sign and
commas.

any suggestions?

Thanks oh masters of the Access world
 
V

Van T. Dinh

I thought:

calculatedfield: Format(([Field1]+[Field2]),"#.00")

should work. Are you sure you exported this Calculated
Field?

However, try also:

CalculatedField:
Format(CDbl([Field1]+[Field2]),"#.00")

HTH
Van T. Dinh
MVP (Access)
 

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