This topic is locked
[SOLVED]

 How do I stop numbers from rounding up???!!!!

9/25/2008 11:09:18 AM
ASPRunnerPro General questions
author

Okay - I've scoured the forum and many Access and ASP forums on how to stop numbers from rounding up. I enter 7605.98 and I get back 7606. I've tried, I believe, every combination of database field formats and AsprunnerPro visual editor options I can think of, and still the numbers round.
How can it be this difficult to display a number with two digits to the right of the decimal point in AsprunnerPro?
Please help!

Sergey Kornilov admin 9/25/2008

Did you set 'View as' format of this field to 'Number'?

500445 9/25/2008

Did you set 'View as' format of this field to 'Number'?


Many, many times. Instead of asking what I did, how about telling me step by step by step how to display numbers in ASPRunnerPro that are formatted to show two digits to the right of the decimal point? If I enter the number in Access as 56.99 and upload the database, the number displays correctly in the table view. When I edit the number online, however, it reverts back to rounding.
In Access, the Data Type is Currency, the Format is Currency and the Decimal Places are set to Auto. I have also set the Decimal Places to 2 and to 3.
Note that I am using a calculated field to calculate the postage per unit, and somehow that field displays correctly.
Thanks for any help you can offer.

Sergey Kornilov admin 9/25/2008

Sure, here is step-by-step instruction: set 'View as' type of this field to 'Number' in ASPRunnerPro.
If this for any reason doesn't work for you follow the Demo Account route.

500446 9/25/2008

Sure, here is step-by-step instruction: set 'View as' type of this field to 'Number' in ASPRunnerPro.

If this for any reason doesn't work for you follow the Demo Account route.


Okay - I made the affected field a text field in Access. In Asprunner, the edit/add fields are set as text field with no validation. The view fields can be set as either view as number or currency or special using "strValue = FormatNumber(strValue,2)" as the code. I think the biggest change was setting the field to a text field in Access.
It works now, and that's all that matters. Sorry for being so testy.