input mask for currency

M

Martin

Hello

Does anybody know how to set up an input mask for currency
so that you can only input two figure after the decimal
place.

Thanks in advance

Martin.
 
T

Trias

Hi Martin,

try to set the input mask property of the textbox with this:

9999999999999999999999999999.00

The 9's represent number before decimal and 00 will force user to type 2 figures after decimal. Make sure you put enough 9's to cover your possible max value.

Hope this helps.

----- Martin wrote: -----


Hello

Does anybody know how to set up an input mask for currency
so that you can only input two figure after the decimal
place.

Thanks in advance

Martin.
 
J

JohnWL

Have you tried just setting the Format property on the control to Currency
with the Decimal Places property set to Auto? This does allow the user to
enter more than two digits after the decimal, but then rounds it off. Or is
that what you're trying to prevent?
 
M

Mike Sherrill

Does anybody know how to set up an input mask for currency
so that you can only input two figure after the decimal
place.

An input mask is the wrong thing to use. To guarantee that a column
of type Currency can contain no fractional cents, you need a
validation rule on the column. Something like this should work:

[Your column name]-CCur(Format([Your column name],"0.00"))=0
 
T

Trias

This is good solution.
Thabnk's for sharing the knowledge.

----- Mike Sherrill wrote: -----

Does anybody know how to set up an input mask for currency
so that you can only input two figure after the decimal
place.

An input mask is the wrong thing to use. To guarantee that a column
of type Currency can contain no fractional cents, you need a
validation rule on the column. Something like this should work:

[Your column name]-CCur(Format([Your column name],"0.00"))=0
 
Top