Results 1 to 11 of 11
  1. #1
    vbpeterson is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    14

    Calculation value not less than 1

    Would some be so kind as to help me with a calculated field?

    I need the value to be rounded to the nearest whole number, but not less than one.



    i.e. ERUCALCULATION: Int([IMPERVIOUSAREA]/2840)

    Thank you, Kim

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    vbpeterson -

    You might be able to use...

    ERUCALCULATION: IIF(([IMPERVIOUSAREA]/2840)>=1,Round(([IMPERVIOUSAREA]/2840),0),1)

    Hope this helps...

    Jim

  3. #3
    vbpeterson is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    14
    Dear ketbdnetbp, PERFECT!!! Worked GREAT! Thank you so much. I very much appreciate your help.

    Thank you, Kim

  4. #4
    vbpeterson is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    14
    I spoke too soon. I didn't take into account that I have vacant properties that have ERU value of 0. So I need it to be anything greater than 0 or less than 1 equals 1.

  5. #5
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    Kim -

    Not sure I understand...

    ERU value of 0?

    Are you saying that, this... [IMPERVIOUSAREA]/2840 = 0 when the property is vacant? If not, please explain detail.

    Thanks,

    Jim

  6. #6
    vbpeterson is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    14
    Yes - [IMPERVIOUSAREA]/2840 = 0 when the property is vacant

    I need 0 values to stay 0, but ">0 and <1" values to = 1.

    Thank you, Kim

  7. #7
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    Kim -

    So, if I understand it correctly, you might try...

    ERUCALCULATION: IIF(([IMPERVIOUSAREA]/2840)=0,0,IIF(([IMPERVIOUSAREA]/2840)>=1,Round(([IMPERVIOUSAREA]/2840),0),1))

    Hope this helps.

    Jim


  8. #8
    vbpeterson is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    14
    HOORAY! Perfect! That does it. Thank you so much for your help.
    Kim

  9. #9
    vbpeterson is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    14
    Hi Jim, One more question. What if I wanted all values greater than 1 to round to the nearest tenth, instead of the nearest whole number? Thank you, Kim

  10. #10
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    Kim -

    I'm not totally sure on that one but, you might try...

    ERUCALCULATION: IIF(([IMPERVIOUSAREA]/2840)=0,0,IIF(([IMPERVIOUSAREA]/2840)>=1,Round(([IMPERVIOUSAREA]/2840),1),1))

    and see if that produces the desired results.

    All the best,

    Jim

  11. #11
    vbpeterson is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    14
    That is perfect. Works great. Thank you, thank you, thank you.

    Sincerely, Kim

Please reply to this thread with any new information or opinions.

Similar Threads

  1. BMI calculation
    By puush in forum Programming
    Replies: 9
    Last Post: 08-19-2014, 05:05 AM
  2. Calculation
    By sabrish72 in forum Reports
    Replies: 3
    Last Post: 06-06-2011, 12:41 AM
  3. value calculation
    By kyle in forum Access
    Replies: 3
    Last Post: 03-06-2011, 12:29 PM
  4. Need help with calculation please
    By Gabriel984 in forum Forms
    Replies: 6
    Last Post: 09-09-2010, 12:06 PM
  5. Calculation
    By thestclair in forum Reports
    Replies: 1
    Last Post: 04-29-2006, 11:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums