How do you turn off automatic rounding in a query IIf statement?

J

JMalecha

I am using an IIf statment in my query and the result is rounding the numbers
instead of displaying the decimal places. I have tried changing the
properties to show one decimal place, but it is still rounding.
 
M

Maurice

Where did you change the decimals? You should change this in the table design
of it is one of the operators. If it's a calculation answer try putting the
iif in a Cdbl function which might give it the necessary decimals. Also
rightclik the field in the query field and place the decimals there also
(format)

So the statement could look something like this:

iif(testhere="test";"test";cdbl(calculationfieldhere))

hth
 
J

John W. Vinson

I am using an IIf statment in my query and the result is rounding the numbers
instead of displaying the decimal places. I have tried changing the
properties to show one decimal place, but it is still rounding.

It would help a bit if you would post the actual SQL view of the query. My
guess is that you're using a table field with the default Long Integer
datatype; integers are by definition whole numbers.
 

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