Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

round up function

Status
Not open for further replies.

ocan

Programmer
Jun 28, 2004
31
0
0
US
what is the equivalent of round up in access?

Regardless of the number I always want to round up to the nearest 1.

I appreciate your help.

Thanks,
Angie
 
?round(2.55,0)
3
?round(2.5,0)
2
?format(2.5,"#")
3
?format(2.55,"#")
3

"The Round function performs round to even, which is different from round to larger."
--Microsoft

Format always rounds up
 
still having problems.

I'm trying to do this function in a report with a text box

Text24=244.1 I want another box(text25) to ready 245

I put in the control source of text 25:
?format([Text24],"#")

It gives errors. Am I not putting it in right? or do you have another method?
 
Apologies, I misread your post:

[tt]=IIf([Text24]> Int([Text24]), [Text24] + 1, [Text24])[/tt]

The ? was to illustrate. It is from the immediate window. Format only rounds up where the decimal is >=.5. I should not have used the word 'always'.
 
That works great. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top