Converting Number to Text

S

Shawn

How do I convert a number (including 6 decimal places)
to a text format and not loose any of the decimal places.
For example the number 10.000000 converts to the string
"10.000000".

Thanks,
Shawn
 
M

Marshall Barton

Shawn said:
How do I convert a number (including 6 decimal places)
to a text format and not loose any of the decimal places.
For example the number 10.000000 converts to the string
"10.000000".


Depends on where/how it's being used. If it's just the
number in a text box, use a custom format such as:

0.000000

If you're concatenating it to a string, use the Format
function in the text box's control source expression:

="The value is " & Format(numberfield, "0.000000")
 
G

Guest

-----Original Message-----



Depends on where/how it's being used. If it's just the
number in a text box, use a custom format such as:

0.000000

If you're concatenating it to a string, use the Format
function in the text box's control source expression:

="The value is " & Format(numberfield, "0.000000")
Thank you,

That works much better than using:

String (6 - (Len(numberfield) - InStr
(numberfield,".")),"0")

- If InStr(numberfield,".") <> 0

Regards,
Shawn
 

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