How to Format Numeric Text Box Input

  • Thread starter Thread starter Mike Thomas
  • Start date Start date
M

Mike Thomas

This should be a simple one - but I cant find much in the documentation.

In Access 2000, I have a form with an unbound text box.

The user needs to enter a cost with up to 5 decimal places, for example
123.12345, but perhaps no decimal places, or perhaps nothing to the left of
the decimal, like .123.

What input mask would allow the entry into the textbox of numeric values
only, no more than 5 decimal places, and a decimal point?

Many thanks
Mike Thomas
 
This should be a simple one - but I cant find much in the documentation.

In Access 2000, I have a form with an unbound text box.

The user needs to enter a cost with up to 5 decimal places, for example
123.12345, but perhaps no decimal places, or perhaps nothing to the left of
the decimal, like .123.

What input mask would allow the entry into the textbox of numeric values
only, no more than 5 decimal places, and a decimal point?

A blank input mask, would be my preference!

9.09999

would work as well.

Note that a CURRENCY datatype has *four* decimal places and will not
accept a fifth; a Long Integer won't take any decimal places at all.
You'll probably need to use a Float or Double, and put up with the
fact that Float and Double datatypes have roundoff error (e.g. 0.2 +
0.3 + 0.5 does NOT necessarily equal 1.0, but instead sums to
0.99999999999958).
 
Thanks again, John - I learned the hard way about the currency type. For
all the reasons you mentioned I usually use the decimal type in the table's
field type, but that does present a problem in reflecting those values in
variables.
Mike Thomas
 
Back
Top