DAvg in control - format problem

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?
 
K

Ken Snell [MVP]

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

Silvio

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?
 

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