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

Rounding from dollars/cents to thousands

Status
Not open for further replies.

Freckles

Technical User
May 1, 2000
138
US
X-) At the report level, I would like to round dollar values to thousands (without decimals). Example: show $1,449,450,687.23 as $1,449,451 Using Access 97. ::) Deb Koplen
deb.koplen@verizon.com

A person can stand almost anything except a succession of ordinary days.
 
show $1,449,450,687.23 as $1,449,451

If the 'values'e really in that format, there are some issues to be resolved. If this is just the display with currency adn seperators applied to the underlying values, just divide by 1000:

? Round(1449450687.23 / 1000)
1449451

Otherwise, respond with sme additional details, such as HOW you got into this situation - and why you cannot correct it at the table/field level.



MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Thanks so much for your expeditious response.

When I download the data from the BIG mainframe, it comes in to the 5th decimal. I can not round at the query level because some reports want dollars and some reports want thousands (and probably some want MILLIONS!)

Example: Underlaying table value: 1449450687.23876 and I need to get out at the report level $1,449,450,687 or $1,449,451 or $1,450

::) Deb Koplen
deb.koplen@verizon.com

A person can stand almost anything except a succession of ordinary days.
 
? Format(1449450687.23876 , "currency")
$1,449,450,687.24

? Format(Round(1449450687.23876 / 1000), "$" & "############")
$1449451

MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Thanks again for your quickness.

No Problem with
? Format(1449450687.23876 , "currency")
$1,449,450,687.24

But is that not the same thing as using Currency in the control's format property with decimal places set to 2?

Question regarding
? Format(Round(1449450687.23876 / 1000), "$" & "############")
$1449451

I tried to put this directly in the field's control property and it did not understand "round". Also, how can I get the commas in the output?

::) Deb Koplen
deb.koplen@verizon.com

A person can stand almost anything except a succession of ordinary days.
 
When I responded to MichaelRed's last post, I realized that a part of my brain must have been missing as I knew the answer all along. I guess what I was really looking for was a way to do it in the format field (which could all be set at the same time with a "multiple selection") rather than in the control field.
::) Deb Koplen
deb.koplen@verizon.com

A person can stand almost anything except a succession of ordinary days.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top