Limit currency input to two decimal

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I have a problem with 'genius' users. They keep over
typing the currency fields.

So $100.20 suddenly gets typed in as $100.201.

The field is set to currency in the table. I've tried
setting the decimal on the form and table to 2, but this
doesn't stop them from entering extra numbers.

What is the easiest way to prevent them from going beyond
two decimals?

Thanks in advance,
Ron.
 
You could use an Input Mask or, in the AfterUpdate event of the control,
truncate anything beyond 2 decimals by rewriting the value of the control.

Example:
Me.ctlMyControl = Int(Me.ctlMyControl * 100) / 100
 
Back
Top