Rounding

M

Michael Sainz

Hey all,
I have built an order form and i'm trying to round to the nearest cent.
When I use an expression box, it does this, but when I use a text box (since
I need to store the price) I am unable to round up or down.

For example, I have a unit with a price of $28.50 and it needs to have a
discount of 15%. That makes the price $24.225. In the expression box, it
displays $24.23 but in a text box, it creates a validation error and
displays $24.2250000. Now in the sample forms the text boxes for the Invoice
sample are able to do this rounding, so why am I unable to duplicate this?

Any help is much appreciated!

Michael
 
M

Michelle B

Make sure your field is a Decimal datatype and not a string. In the textbox
properties data tab next to the Data type drop down list is a Format button.
When you click on this you can designate that the format is a number and set
the number of decimal places. Rounding will occur automatically for you.
 
Top