Rounding

A

Alex H

Hi, i have the following syntax in an abject. I need to modify it so that
where there answer is not a ehole number, it rounds up to the next whole
number.
I dont seem able to get the correct syntax.

Thanks for any help
A


Me![TutorPercentageMark] = [TutorMarks] / [Max Marks]
 
M

missinglinq via AccessMonster.com

Me![TutorPercentageMark] = [TutorMarks] / [Max Marks]

If ([TutorMarks] Mod [Max Marks]) <> 0 Then
Me![TutorPercentageMark] = Int(Me![TutorPercentageMark]) + 1
End If
Is the field set to an Integer datatype rather than Single or Double?
Hi, i have the following syntax in an abject. I need to modify it so that
where there answer is not a ehole number, it rounds up to the next whole
[quoted text clipped - 5 lines]
Me![TutorPercentageMark] = [TutorMarks] / [Max Marks]
 
J

John W. Vinson

Hi, i have the following syntax in an abject. I need to modify it so that
where there answer is not a ehole number, it rounds up to the next whole
number.
I dont seem able to get the correct syntax.

Thanks for any help
A


Me![TutorPercentageMark] = [TutorMarks] / [Max Marks]

[TutorMarks] \ [Max Marks] + IIF(Int([TutorMarks] / [Max Marks]) =
[TutorMarks] / [Max Marks], 0, 1)

John W. Vinson [MVP]
 
Top