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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I roundup? 1

Status
Not open for further replies.

Taecca

Technical User
Jul 20, 2004
59
US
I need to roundup the numbers in one of my column.
Can someone tell me what to write in my query to display the numbers correctly?

Thank you
 
If you set the column's Decimal Places property to something other than "Auto" in the underlying table, Access will automatically round it to that many places when it is displayed. (This doesn't affect the underlying stored value.)

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
In the field property of the field I have set "Decimal Places: 2".

The number I get is 2922.50
I need to get 2923

 
Then set Decimal Places: 0.

You may have the mistaken idea (many people do) that the Decimal Places property controls how many decimal places are stored. It doesn't. Single and Double numbers always have as many decimal places as necessary (or as many as possible, if the number gets too large to fit). The property only affects how many are displayed.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
You are absolutely correct. I learned something new today.

Anyhow my problem is that I am doing a sum of values from a table.
My sum is incorrect because I need to first round up all the values in the table itself.

Is there a way to solve this problem?
 
Use an Update query:
UPDATE Table1 SET Field1 = Round(Field1, 2)
rounds all the values to 2 decimal places.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top