General discussion

  • Creator
    Topic
  • #2316024

    Rounding Down in Access

    Locked

    by d_bones ·

    Does anyone know how to round down a figure in an Access report. Or alternatively any standard formula for rounding down a number. This ones killing me.

All Comments

  • Author
    Replies
    • #2748262

      Reply To: Rounding Down in Access

      by lumberjack ·

      In reply to Rounding Down in Access

      you can use the integer function

      int(number) or int(fieldname)

    • #2746422

      Reply To: Rounding Down in Access

      by sachin ·

      In reply to Rounding Down in Access

      Give this a try:

      (Int(([YourNumber]-0.1)/1000)+1)*1000

      I substract 0.1 as a safety just in case the number is exactly 10,000 to leave it at 10,000 rather than making it 11,000.

    • #3365434

      Reply To: Rounding Down in Access

      by d_gilmour_1978 ·

      In reply to Rounding Down in Access

      Function roundDown(numbertoround As Single, dp As Integer) As Single

      roundDown = (Int(numbertoround * 10 ^ dp)) / (10 ^ dp)

      End Function

      ‘note dp is the number of decimal places you want

      this bit of code should solve you problem

Viewing 2 reply threads