Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decimal help.

Status
Not open for further replies.

Zerdax

Programmer
Apr 20, 2005
48
IE
Hi i have a texbox that is a sum of a calculation.
The problem is that when marked the texbox it displays plenty decimals else it displays only 2. I want only to have to decimals. So the textbox should round up to 2 decimal not only displaying but when i want to copy the number to. (when i mark the box it then displays 7 or 8 decimals, a bit confusing and calculation is getting wrong to) i want that it should round up to .0 or .50 or .100

any help
 
Try the "round" function. In text box:
=Round(sum=[whatever],#of decimals to round to) &
in the text box set the number of decimals to go to.
 
In the table definition set the field's decimal places to 2.

If necessary, delete the textbox control from your form and then re-add it. That way it will pick up the table structure changes.

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top