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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting sstxt value

Status
Not open for further replies.

sirajhasan

Programmer
Jun 13, 2003
1
US
I am using a ssTxt control which displays the average of the difference of two dates (the difference is calculated
at the data row level and stored in an integer type variable and the average is being calculated on a txtcontrol at the after section of forth group.

It is showing correct data (i.e. average) but not accepting
any Format. I want to show it upto one place of decimal but it is showing upto 10 places or so.

I have tried most of the formats.
Any input is highly appreciated.
 
zero-digit placeholder. If <exprs to format> has fewer digits than <format pattern>, the empty digits are filled with zeros. If <exprs
to format> has more digits to the right of the decimal than <format pattern>, the result is rounded to the number of places in <format pattern>; if it has more digits to the left of
the decimal, the extra digits are displayed without modification.

example...Format(3434.28, &quot;0.0&quot;)Returns 3434.3
Format(3434.28, &quot;0.00&quot;)Returns 3434.28
 
Just a thought.
you could overide the GetText method.

Function GetText( ) As String
GetText = Super::GetText( )
' Insert your code here

Gettext=format(Gettext,&quot;00.00&quot;)
End Function

Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top