Results 1 to 4 of 4

Thread: Rounding (2002)

  1. #1
    Lounger
    Join Date
    Apr 2002
    Location
    Burlington, Washington, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rounding (2002)

    I am using a query to round a currency field (i.e. 7,890 to 8,000). How can this be done?

    Larry

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Rounding (2002)

    Are you trying to round all numbers up to the nearest thousand?
    If so, try:

    int((Number+999)/1000)*1000

    HTH
    Pat

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Rounding (2002)

    If you just want to round to the nearest multiple of 1000 (that is, 7499 becomes 7000 and 7500 becomes 8000), use 500 instead of 999 in Pat's expression:

    Int((Number+500)/1000)*1000

  4. #4
    Lounger
    Join Date
    Apr 2002
    Location
    Burlington, Washington, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rounding (2002)

    It works! Thank you.

    Larry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •