Rounding Value Up to Whole Number

P

PowellGirlTN

I have a report footer that I'm adding values from the detail section. Many
of my values that I'm adding are .333. Once I sum the value in the footer, I
end up with not a whole number, for example 9.999. Is there a property I can
set to bring the value to the next whole number. Thanks for your help
 
E

Evi

Try
=- Int( - [MyField])

(note there is a - before the Int and before the my field)

Substitute the name of your own text box)

Evi


int(number*100 + 0.5) / 100
 
P

PowellGirlTN

Where do I put this, in the format control? I tried it there and it didn't
change the number to a whole number. I appreciate your help, thank you

Evi said:
Try
=- Int( - [MyField])

(note there is a - before the Int and before the my field)

Substitute the name of your own text box)

Evi


int(number*100 + 0.5) / 100
PowellGirlTN said:
I have a report footer that I'm adding values from the detail section. Many
of my values that I'm adding are .333. Once I sum the value in the footer, I
end up with not a whole number, for example 9.999. Is there a property I can
set to bring the value to the next whole number. Thanks for your help
 
E

Evi

Combine it with your Sum field so that the text box with which you added up
your field now says

eg

= -Int(-Sum([YourField]))

Replace 'Your field' with the name of the field which you are summing.

Evi

PowellGirlTN said:
Where do I put this, in the format control? I tried it there and it didn't
change the number to a whole number. I appreciate your help, thank you

Evi said:
Try
=- Int( - [MyField])

(note there is a - before the Int and before the my field)

Substitute the name of your own text box)

Evi


int(number*100 + 0.5) / 100
PowellGirlTN said:
I have a report footer that I'm adding values from the detail section. Many
of my values that I'm adding are .333. Once I sum the value in the footer, I
end up with not a whole number, for example 9.999. Is there a
property I
can
set to bring the value to the next whole number. Thanks for your help
 
P

PowellGirlTN

Worked like a charm, thanks so much

Evi said:
Combine it with your Sum field so that the text box with which you added up
your field now says

eg

= -Int(-Sum([YourField]))

Replace 'Your field' with the name of the field which you are summing.

Evi

PowellGirlTN said:
Where do I put this, in the format control? I tried it there and it didn't
change the number to a whole number. I appreciate your help, thank you

Evi said:
Try
=- Int( - [MyField])

(note there is a - before the Int and before the my field)

Substitute the name of your own text box)

Evi


int(number*100 + 0.5) / 100
I have a report footer that I'm adding values from the detail section.
Many
of my values that I'm adding are .333. Once I sum the value in the
footer, I
end up with not a whole number, for example 9.999. Is there a property I
can
set to bring the value to the next whole number. Thanks for your help
 

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