Decimal Places

T

TJAC

I have a query and would like to add a decimal place after a whole number,
followed by a zero. I have this formula in my query
(Round((([Landed_Cost]-[Invoice_Cost])/([Invoice_Cost])),4)*100). Which
displays 3.12, however if the answer is 3, I would like for it to display
3.0, is there a way to do this without exporting it to Excel to achieve the
results I would like?

Thanks in Advance,
 
S

Sprinks

Format((Round((([Landed_Cost]-[Invoice_Cost])/([Invoice_Cost])),4)*100),"0.0")

Sprinks
 
J

John Nurick

TJAC said:
I have a query and would like to add a decimal place after a whole number,
followed by a zero. I have this formula in my query
(Round((([Landed_Cost]-[Invoice_Cost])/([Invoice_Cost])),4)*100). Which
displays 3.12, however if the answer is 3, I would like for it to display
3.0, is there a way to do this without exporting it to Excel to achieve
the
results I would like?

It's not simple to display one decimal place for whole numbers and two for
others. If you don't mind always having two decimals
3.00 3.12
you can just use the Format and DecimalPlaces properties of the query column
or the textbox you're using to display the value (set Format to Standard and
DecimalPlaces to 2).

Or you could include the Format() function in the query, e.g.
Format((Round((([Landed_Cost]-[Invoice_Cost])/([Invoice_Cost])),4)*100),
"0.00")
 
Top