Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Numbers to string holding decimal places and point

Status
Not open for further replies.

FrustratedPgmr

Programmer
Jul 29, 2002
17
0
0
US
I need to convert the number field with 2 decimal places to a string in a new field in another table. I must keep the decimal point even if it is ".00". i.e. 10000.00 will still be 10000.00 when it becomes a string. Currently it is converting as 10000. Has anyone else dealt with this? Any ideals would be welcome. I am stuck on this after 2 years of hard work. Help Please!
 
If you want at least 2 decimal places up to however many there are, then use

Format(CStr(mynumber), "#.00#")

The results of this might not be what you expect, depnding on the data type of what you are feeding it. You could get something like 10000.98000000000018 from a value of 10000.98.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top