• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

Roundup to 3 decimal places in access 2003 query

Hi all.

I have an Access 2003 query where I want to use the equivalent of the Excel ROUNDUP function.

Does anyone know if something similar exists in access? I want to roundup to 3 decimal places.

Thank you in advance!

0
printmedia
Asked:
printmedia
  • 2
1 Solution
 
Gustav BrockCIOCommented:
You can use this function.

/gustav
Public Function RoundUp001( _
  ByVal dblValue As Double) _
  As Double

' Rounds up dblValue to next multiplum of 0.001.
'
' 2002-05-21. Cactus Data ApS, CPH.

  Const cdblInterval001 As Double = 0.001

  Dim dblTmp            As Double
  
  ' No special error handling.
  On Error Resume Next
  
  dblTmp = dblValue / cdblInterval001
  dblTmp = -Int(-dblTmp)
  dblValue = dblTmp * cdblInterval001
  
  RoundUp001 = dblValue

End Function

Open in new window

0
 
printmediaAuthor Commented:
Thanks!
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now