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

Problems with too many decimal numbers

Status
Not open for further replies.

dwight1

IS-IT--Management
Aug 22, 2005
176
US
Hi

I have a data type number that i use it in the query. I use the query to make a graph. The problem is in the graph the number of decimal places is almost 8 to 10. I want it to have only two decimal places.

For example, I have a number 530678682. I use the number in the query and divide it by 1000000..It gives me 530.678682. I want only two decimals. I tried using Int function but that removes the decimal altogether. Example: int(Sum([Amt])) AS TotalAmount gives 530.

I have tried to change the format in the query, graph etc. but to no success.

Any ideas

Dwight
 
How are ya dwight1

How about:
Code:
[blue]   Int(Sum([Amt])/10000)/100[/blue]

Calvin.gif
See Ya! . . . . . .
 
TheAceMan1,

Thanks for your reply. I want to use those numbers in the pie chart. When i try to change the format type to Currency and decimals. It looks right in the design view but when it turns to print view it turns back to number.

Any ideas

Dwight
 
Hi dwight1,
How about putting the ROund-function in your query?

number2: Round([number]/1000000;2)

Pampers [afro]

you're never too young to learn
 
Thanks Pampers!

I will try it out on Tuesday.

Happy New Year

Dwight
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top