I m using VB6 and MS Access.
In MS Access table I have already set the decimal digit to 2 and it is showing only 2 digits after decimal in MS Access Table
but when I put the data in
MSH Flex grid then it shows around 12 to 14 decimal digits.
How to fix this.
Is there any property for grid controls
Or how to resolve through coding.

Please suggest a better site for the study of MSHFlex Grid control..

Thnx.

Is there any property for grid controls
Or how to resolve through coding.
Thnx.

use the format function:

format(sngValue, "##.##")

Private Sub Form_Load()
   Dim sngValue as Single 
   sngValue = 52.345
   MSFlexGrid1.Col = 1
   MSFlexGrid1.Row = 1
   MSFlexGrid1.Text = Format(sngValue, "##.##")
End Sub

Notice, you have to set the Column and row you're working with before setting the value of the text.
Check your MSDN documentation of the format property.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.