Editing monetary amounts

R

RLN

Re: Access 2003

I have a textbox for Debit and Credit amounts. Right now I can enter
$45.78888 and when I tab to the next field the amount becomes $45.79. The
actual amount should be $45.78. These columns in the table are set to 2
decimal places, which I though would have fixed this. So I thought I would
set up an edit mask. Thi swon't work as to set an Edit mask, they can only
be for Text and Date fields, not numeric fields.

How do I modify these two text boxes to where when the 2 numbers to the
right of the decimal are entered, no more data can be entered into the text
box?

Thanks.
 
J

Jeff Boyce

It sounds like Access is following the "rounding rule" I learned in
elementary school. Are you saying that you'd want $45.789999 to also be
$45.78?

Take a look at the underlying properties of the textboxes (or the underlying
fields' properties). If you set the format to "Currency" and limit it to 2
decimal places, does that do what you want?

More info, please.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

KARL DEWEY

Use input mask -- #.## and it will not allow more than two digits
following decimal.
 
R

RLN

Jeff,

Right now the user can enter "$45.7867890". When they tab to the next
field, this value changes and shows on screen "$45.79".
I need to only allow them to enter 2 digits to the right of the decimal.
Anything past that should be cancelled and not shown and the value should
remain at $45.78.

Hope this clarifies.
 
R

RLN

I got it to work. I set the Edit Mask to "###,###,###.##", set decimal
places to 2.
I don't suppose I need to have Decimal places set to 2 since the edit mask
is in place.

Thanks for the assistance here, I appreciate it.

RLN
 

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