Trailing zeros

Trailing zeros

Anonymous
Not applicable
260 Views
2 Replies
Message 1 of 3

Trailing zeros

Anonymous
Not applicable
Hi,

I want to show values in a textbox from an Access database. E.g. a value
4.500.

In Access the datatype of the column is Number

Field Size : Double
Format : Fixed
Decimal Places : 3

When I run the program the value shown in the textbox is 4.5
The trailing zeros are removed.

Anybody an idea to solve this?

Thanks,

Michel
0 Likes
261 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
use the format function!

format(4.5,"#.###")

this will return
4.500

I've got a little function that will do this with variable decimal places if
you like
Let me know if you want it & I'll post it here for you...

Thomas Smith

"Michel van den Maagdenberg" wrote in message
news:AA81801A9A5D7EDF73E7FF5447D65021@in.WebX.maYIadrTaRb...
> Hi,
>
> I want to show values in a textbox from an Access database. E.g. a value
> 4.500.
>
> In Access the datatype of the column is Number
>
> Field Size : Double
> Format : Fixed
> Decimal Places : 3
>
> When I run the program the value shown in the textbox is 4.5
> The trailing zeros are removed.
>
> Anybody an idea to solve this?
>
> Thanks,
>
> Michel
>
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
Correction!!!
Sorry, use this instead!

format(MyNumber,"#.000")
to return 3 decimal places (including zeros)

"Thomas Smith" wrote in message
news:8AECFC5B57DF779DE45F2D714AF0185F@in.WebX.maYIadrTaRb...
> use the format function!
>
> format(4.5,"#.###")
>
> this will return
> 4.500
>
> I've got a little function that will do this with variable decimal places
if
> you like
> Let me know if you want it & I'll post it here for you...
>
> Thomas Smith
>
> "Michel van den Maagdenberg" wrote in message
> news:AA81801A9A5D7EDF73E7FF5447D65021@in.WebX.maYIadrTaRb...
> > Hi,
> >
> > I want to show values in a textbox from an Access database. E.g. a value
> > 4.500.
> >
> > In Access the datatype of the column is Number
> >
> > Field Size : Double
> > Format : Fixed
> > Decimal Places : 3
> >
> > When I run the program the value shown in the textbox is 4.5
> > The trailing zeros are removed.
> >
> > Anybody an idea to solve this?
> >
> > Thanks,
> >
> > Michel
> >
> >
>
>
0 Likes