Rounding

  • Thread starter Thread starter Alex H
  • Start date Start date
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]
 
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]

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
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]
 

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

Back
Top