windowsvb6number-formattingmsflexgrid

Numbers formatted using scientific notation in the MSFlexGrid on Windows 7


I installed a vb6 application on windows seven and office 2010.

This application works fine on xp/vista with Ms access 2007.

The MsflexGrid shows wrong numbers on win seven with the sign "E" like 4526E ...

What could be the problem. is it access 2010?


Solution

  • 1.2E+34 is a perfectly valid format when a number contains lots of significant zeros:

    ?cdbl(12000000000000000000000000000000000)
     1.2E+34 
    

    Does the same grid differ when showing the same data?

    Where are the numbers coming from? If they're being added by code (vs data bound) then you can use Format() to use an explicit format string rather than letting Windows do what it thinks is best.