Limit currency input to two decimal

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.
 
W

Wayne Morgan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top