DAvg in control - format problem

  • Thread starter Thread starter Silvio
  • Start date Start date
S

Silvio

Hello everyone, I have the following code in the unbounded control source of
a form =DAvg("[Days]","tblCalibrations") and it works fine. The problem I am
having is that even though I have the control format set to “General Numberâ€
with “0†(with no quotations marks) decimal places, the number still displays
with many decimal places (e.g. 17.568642587 instead of just 17).

Any idea how to fix this in Access 2003?
 
Change the expression to this, if you do not want to "round" but just want
to truncate the decimal places from the integer portion of the value:

=Int(DAvg("[Days]","tblCalibrations"))
 
Thanks Ken, that works just fine.

Ken Snell said:
Change the expression to this, if you do not want to "round" but just want
to truncate the decimal places from the integer portion of the value:

=Int(DAvg("[Days]","tblCalibrations"))

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


Silvio said:
Hello everyone, I have the following code in the unbounded control source
of
a form =DAvg("[Days]","tblCalibrations") and it works fine. The problem I
am
having is that even though I have the control format set to "General
Number"
with "0" (with no quotations marks) decimal places, the number still
displays
with many decimal places (e.g. 17.568642587 instead of just 17).

Any idea how to fix this in Access 2003?
 
Back
Top