Zeros in a report field

  • Thread starter Thread starter ksmith
  • Start date Start date
K

ksmith

I am doing a report that shows calculated values of hours per week.

The report takes the sum of all hours on a given day and gives me the
total at the bottom of the report

ex:
Tues
2
3
2.5
2.1
total 9.6

The problem is that I want to format the total to read only a decimal
with there is a number other than zero present. Meaning if the total
equals just 6, I want the report to display just 6 and not 6.0. My
text box control source reads =sum([tues]), which gives me the sums of
all the inputed tues values. Is there a way to format the text box
that if the value after the decimal is 0 drop it and if the value is 1
to 9 keep it. I only want one decimal place.

Thanks
 
I am doing a report that shows calculated values of hours per week.

The report takes the sum of all hours on a given day and gives me the
total at the bottom of the report

ex:
Tues
2
3
2.5
2.1
total 9.6

The problem is that I want to format the total to read only a decimal
with there is a number other than zero present. Meaning if the total
equals just 6, I want the report to display just 6 and not 6.0. My
text box control source reads =sum([tues]), which gives me the sums of
all the inputed tues values. Is there a way to format the text box
that if the value after the decimal is 0 drop it and if the value is 1
to 9 keep it. I only want one decimal place.

Thanks

Excuse my incomplete instructions. I have not worked with that kind of
problem. However if you compute the value of the number, minus the integer
of the number with the result multiplied by 10 and then totaled over the
range you are looking at, that should give you want you want. Take a look
at VAL and Integer in the help files. An integer is the whole number part
of a number.
 
Back
Top