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!

Zero of the decimal does not want to print (0.250) ???

Status
Not open for further replies.

sarah77

Programmer
Jun 4, 2002
36
US
I'm not be able to print a numeric field witha value 0.250 ?
It always printed as 0.25 and the user wants three decimal digits 0.250 ( any comments ).

Thanks
 

Are you in Excel? Format/Cells/Number - Decimal Places = 3
 
Nop,
i'm using visual basic 6 to write an application that requires to print any numeric value with the last three decimal eventhough the third one is zero such as (0.250) .

thanks
 
Code:
Dim sDisplayString As String

sDisplayString = Format("0.25","0.000")

MsgBox sDisplayString
 
I found a way at the moment of printing without changing the
value of the field as the following :

if left( right(str(12.25),3),1 )="." then
print str(12.25)+"0"
endif

the result will of printing will be 12.250

Thanks for everybody tried to help
 
Code:
Dim sVal As String
sVal = Format("0.25","##,##0.000")
Print sVal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top