Exporting numeric numbers with leading zeroes

D

David

I need to export to a text file a table that contains numeric fields that are
12 position decimals fields. I need to keep the leading zeroes and the
negative signs intact. I am not familiar with VB coding. Any suggestions?
 
K

Klatuu

Use a query to export your table, and for that field use:
format([SomeField,String(12,"0")) As AliasName
 
J

J_Goddard via AccessMonster.com

Hi -

This suggestion works, but does not allow for decimal places. How many
places do you require after the decimal point? for example, if you need 4
decimal places, use:

format([yourfield],"0000000.0000")
e.g. format(9.06658,"0000000.0000") results in 0000009.0666


John


Use a query to export your table, and for that field use:
format([SomeField,String(12,"0")) As AliasName
I need to export to a text file a table that contains numeric fields that are
12 position decimals fields. I need to keep the leading zeroes and the
negative signs intact. I am not familiar with VB coding. Any suggestions?
 

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