Removing Decimal Places in Query

T

Tom

I am using some calculated summary queries that involve multplication.
The results of these queries are accurate but are yielding up to four
decimal places, e.g., 16.6666. I do not want any decimal places, only
whole numbers, e.g., 16. I adjusted the Report Properties to 0 but
still get the decimals in the Report Textbox and on the subsequent
Chart. How do I get rid of decimals in a query?

TIA

Tom
 
C

Chris2

Tom said:
I am using some calculated summary queries that involve multplication.
The results of these queries are accurate but are yielding up to four
decimal places, e.g., 16.6666. I do not want any decimal places, only
whole numbers, e.g., 16. I adjusted the Report Properties to 0 but
still get the decimals in the Report Textbox and on the subsequent
Chart. How do I get rid of decimals in a query?

TIA

Tom

Tom,

CInt() will get rid of fractions.

---------------
CInt(<expression>)

Examples:

CInt(1.6666)

1


CInt(2.356)

2
---------------


Sincerely,

Chris O.
 
C

Chris2

Duane Hookom said:
Oops
CInt(1.6666) = 2

Int(1.6666) = 1

<Looks back at his still open Immediate window, the last action
peformed in it having been the above CInt.>

Yup, 2.

I also typoed the second CInt function, although there is also an Int
function.

:blush:

Sincerely,

Chris O.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top