Decimal Places

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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,
 
Format((Round((([Landed_Cost]-[Invoice_Cost])/([Invoice_Cost])),4)*100),"0.0")

Sprinks
 
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")
 

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

Back
Top